diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..b61d5c9 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,40 @@ +name: docs +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write # To push a branch + pages: write # To push to a GitHub Pages site + id-token: write # To update the deployment status + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install latest mdbook + run: | + tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') + url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" + mkdir mdbook + curl -sSL $url | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Build Book + run: | + # This assumes your book is in the root of your repository. + # Just add a `cd` here if you need to change to another directory. + cd docs + mdbook build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'docs/book' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b684f77..8e08b7a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,10 @@ on: tags: - "v*.*.*" +permissions: + contents: read + packages: write + jobs: release: runs-on: ubuntu-latest @@ -17,6 +21,5 @@ jobs: with: go-version-file: go.mod - - uses: ko-build/setup-ko@v0.7 - - run: ko build --bare --tags ${{ github.ref_name }} + - run: ko build --bare --tags ${{ github.ref_name }} github.com/apricote/releaser-pleaser/cmd/rp diff --git a/.github/workflows/releaser-pleaser.yaml b/.github/workflows/releaser-pleaser.yaml index e0ce818..7fb4b81 100644 --- a/.github/workflows/releaser-pleaser.yaml +++ b/.github/workflows/releaser-pleaser.yaml @@ -22,3 +22,5 @@ jobs: uses: ./ with: token: ${{ secrets.RELEASER_PLEASER_TOKEN }} + extra-files: | + action.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ed7bd..f3e7084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [v0.2.0-beta.2](https://github.com/apricote/releaser-pleaser/releases/tag/v0.2.0-beta.2) +### Features + +- update version references in any files (#14) + +### Bug Fixes + +- **ci**: building release image fails (#21) +- **ci**: ko pipeline permissions (#23) + +## [v0.2.0-beta.1](https://github.com/apricote/releaser-pleaser/releases/tag/v0.2.0-beta.1) +### Features + +- update version references in any files (#14) + +### Bug Fixes + +- **ci**: building release image fails (#21) + +## [v0.2.0-beta.0](https://github.com/apricote/releaser-pleaser/releases/tag/v0.2.0-beta.0) +### Features + +- update version references in any files (#14) + ## [v0.1.0](https://github.com/apricote/releaser-pleaser/releases/tag/v0.1.0) ### This is the first release ever, so it also includes a lot of other functionality. diff --git a/action.yml b/action.yml index 075c8b1..2033394 100644 --- a/action.yml +++ b/action.yml @@ -19,12 +19,12 @@ inputs: outputs: {} runs: using: 'docker' - image: ghcr.io/apricote/releaser-pleaser:v0.1.0 # x-releaser-pleaser-version + image: ghcr.io/apricote/releaser-pleaser:v0.2.0-beta.2 # x-releaser-pleaser-version args: - run - --forge=github - --branch=${{ inputs.branch }} - - --extra-files="${{ inputs.extra-files }}" + - --extra-files=${{ inputs.extra-files }} env: GITHUB_TOKEN: ${{ inputs.token }} GITHUB_USER: "oauth2" diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..7214617 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,28 @@ +# Summary + +[Introduction](introduction.md) + +# Tutorials + +- [Getting started on GitHub](tutorials/github.md) +- [Getting started on GitLab]() + +# Explanation + +- [Release Pull Request](explanation/release-pr.md) + +# Guides + +- [Customizing Release Notes](guides/release-notes.md) +- [Pre-releases](guides/pre-releases.md) +- [Workflow Permissions on GitHub](guides/github-workflow-permissions.md) + +# Reference + +- [Pull Request Options](reference/pr-options.md) +- [GitHub Action](reference/github-action.md) +- [GitLab CI]() + +--- + +[Changelog](changelog.md) diff --git a/docs/book.toml b/docs/book.toml new file mode 100644 index 0000000..c109a67 --- /dev/null +++ b/docs/book.toml @@ -0,0 +1,8 @@ +[book] +language = "en" +multilingual = false +src = "." +title = "releaser-pleaser" + +[build] +build-dir = "book" diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..ff8ce10 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,3 @@ +# Changelog + +{{#include ../CHANGELOG.md:2: }} diff --git a/docs/explanation/release-pr.md b/docs/explanation/release-pr.md new file mode 100644 index 0000000..f043db4 --- /dev/null +++ b/docs/explanation/release-pr.md @@ -0,0 +1 @@ +# Release Pull Request diff --git a/docs/guides/github-workflow-permissions.md b/docs/guides/github-workflow-permissions.md new file mode 100644 index 0000000..45b87fb --- /dev/null +++ b/docs/guides/github-workflow-permissions.md @@ -0,0 +1 @@ +# Workflow Permissions on GitHub diff --git a/docs/guides/pre-releases.md b/docs/guides/pre-releases.md new file mode 100644 index 0000000..fd2bbf8 --- /dev/null +++ b/docs/guides/pre-releases.md @@ -0,0 +1 @@ +# Pre-releases diff --git a/docs/guides/release-notes.md b/docs/guides/release-notes.md new file mode 100644 index 0000000..ed1d1e2 --- /dev/null +++ b/docs/guides/release-notes.md @@ -0,0 +1 @@ +# Customizing Release Notes diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000..04ec94d --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1,3 @@ +# Introduction + +{{#include ../README.md:2:}} diff --git a/docs/reference/github-action.md b/docs/reference/github-action.md new file mode 100644 index 0000000..2bc8ce9 --- /dev/null +++ b/docs/reference/github-action.md @@ -0,0 +1 @@ +# GitHub Action diff --git a/docs/reference/pr-options.md b/docs/reference/pr-options.md new file mode 100644 index 0000000..6b6ba14 --- /dev/null +++ b/docs/reference/pr-options.md @@ -0,0 +1 @@ +# Pull Request Options diff --git a/docs/tutorials/github.md b/docs/tutorials/github.md new file mode 100644 index 0000000..c27f953 --- /dev/null +++ b/docs/tutorials/github.md @@ -0,0 +1 @@ +# GitHub diff --git a/go.mod b/go.mod index 9add194..76b6fcb 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.23.0 require ( github.com/blang/semver/v4 v4.0.0 + github.com/go-git/go-billy/v5 v5.5.0 github.com/go-git/go-git/v5 v5.12.0 github.com/google/go-github/v63 v63.0.0 github.com/leodido/go-conventionalcommits v0.12.0 @@ -21,7 +22,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 4678ca7..b5f7d57 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE= -github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= github.com/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY= github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=