diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ffabc67a..a69883a5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: "release" # please read on RELEASE.md on how to trigger this workflow. on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+**" # For example: v0.5.0 v0.5.1-rc2 + - "[0-9]+.[0-9]+.[0-9]+**" # For example: 0.5.0, 0.5.1-rc2. defaults: run: # use bash for all operating systems unless overridden. @@ -73,8 +73,9 @@ jobs: if: matrix.mode == 'clang-fips' run: echo "BAZEL_FLAGS=--config=libc++ --define=boringssl=fips" >> $GITHUB_ENV - - name: Create artifacts # We strip the "v"-prefix from the current tag. - run: VERSION=${GITHUB_REF#refs/tags/v} MODE=${{ matrix.mode }} make dist + - name: Create artifacts + # GITHUB_REF: refs/tags/0.5.1-rc1, resulted VERSION: "0.5.1". + run: VERSION=${GITHUB_REF#refs/tags/} MODE=${{ matrix.mode }} make dist - name: Require static binary if: runner.os == 'Linux' && matrix.mode == 'clang' diff --git a/RELEASE.md b/RELEASE.md index e895e85f..36556f53 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,10 +3,24 @@ ## Release workflow The release workflow defined in [`.github/workflows/release.yaml`](./.github/workflows/release.yaml) -will be triggered whenever a tag that matches `v[0-9]+.[0-9]+.[0-9]+**` (examples of valid tags: -`v0.5.0`, `v0.5.1-rc2`) is created. The workflow invokes the `make dist` command to create tarballs +will be triggered whenever a tag that matches `[0-9]+.[0-9]+.[0-9]+**` (examples of valid tags: +`0.5.0`, `0.5.1-rc2`) is created. The workflow invokes the `make dist` command to create tarballs from the combination of `os` (`darwin` and `linux`) with the selected mode (`default`, `clang`, and `clang-fips`). The tarball name pattern will be: `auth_server__amd64__.tar.gz`. -The version is the same as the given tag with `v` prefix removed. After the tarballs are created, -the workflow uploads the tarballs as attachments to the created release entry on -https://github.com/istio-ecosystem/authservice/releases. +After the tarballs are created, the workflow uploads the tarballs as attachments to the created +release entry on https://github.com/istio-ecosystem/authservice/releases. + +## Make a Release + +To make a release, create an tag at the commit you want. For example + +```sh +git tag -a "0.5.1" +git push upstsream HEAD # You must have admin permission for the repo. +``` + +Github Action will detect the newly created tags and trigger the workflow. Check [Action Runs](https://github.com/istio-ecosystem/authservice/actions) +and watch for its completion. + +Once workflow completes, go to [Release](https://github.com/istio-ecosystem/authservice/releases) +page and draft the release notes, provide Docker image links.