From 0c8f0ed6406193cc1ca08c6c1812bad213ab328e Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Mon, 31 Oct 2022 13:31:11 -0700 Subject: [PATCH] Prepare incoming release --- .github/release-drafter.yml | 4 +++- .github/workflows/docker-publish.yml | 5 ----- .github/workflows/draft-release.yml | 17 +++++++++++++++++ README.md | 23 ++++++++++++++++++++++- action.yml | 2 +- 5 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/draft-release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index c50c1e10..1b697bba 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -3,8 +3,10 @@ name-template: 'v$RESOLVED_VERSION' tag-template: 'v$RESOLVED_VERSION' template: | # Changelog + $CHANGES - See details of [all code changes](https://github.com/actions/jekyll-build-pages/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release + + See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release. categories: - title: '🚀 Features' labels: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3123f2f6..f7250357 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -60,8 +60,3 @@ jobs: push: true tags: ${{ steps.generate-image-tags.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # Drafts your next Release notes as Pull Requests are merged into "main" - - uses: release-drafter/release-drafter@v5 - if: github.ref_name == 'main' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml new file mode 100644 index 00000000..34af8412 --- /dev/null +++ b/.github/workflows/draft-release.yml @@ -0,0 +1,17 @@ +name: Draft release +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + draft-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 430484da..7a0973dd 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,27 @@ This is used along with [`actions/deploy-pages`](https://github.com/actions/depl See [action.yml](action.yml) -# License +# Release instructions + +In order to release a new version of this Action: + +1. Locate the semantic version of the [upcoming release][release-list] (a draft is maintained by the [`draft-release` workflow][draft-release]). + +2. Prepare a pull request to update [`action.yml`][action.yml] to reference the incoming version + +3. Publish the draft release from the `main` branch with semantic version as the tag name, _with_ the checkbox to publish to the GitHub Marketplace checked. :ballot_box_with_check: + +4. After publishing the release, the [`release` workflow][release] will automatically run to create/update the corresponding the major version tag such as `v1`. + + ⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs]. + +## License The scripts and documentation in this project are released under the [MIT License](LICENSE). + + +[release-list]: https://github.com/actions/jekyll-build-pages/releases +[draft-release]: .github/workflows/release.yml +[release]: .github/workflows/release.yml +[release-workflow-runs]: https://github.com/actions/deploy-pages/actions/workflows/release.yml +[action.yml]: https://github.com/actions/jekyll-build-pages/blob/649f5d3c2b2462620c8945f034200e431ceddd29/action.yml#LL31C54-L31C60 diff --git a/action.yml b/action.yml index 1567d86d..7a223331 100644 --- a/action.yml +++ b/action.yml @@ -28,4 +28,4 @@ inputs: default: ${{ github.token }} runs: using: 'docker' - image: 'docker://ghcr.io/actions/jekyll-build-pages:v1.0.4' + image: 'docker://ghcr.io/actions/jekyll-build-pages:v1.0.6'