diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4cd166a..e74021a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,3 +23,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./pleasew run //scripts:pre-release + + - name: Publish Docker images + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + run: ./pleasew run //scripts:publish-images diff --git a/docs/contributers/RELEASES.md b/docs/contributers/RELEASES.md index 01656ba..f83d793 100644 --- a/docs/contributers/RELEASES.md +++ b/docs/contributers/RELEASES.md @@ -19,11 +19,10 @@ This lets us use `git desribe` to give us a descriptive version from any commit ## Creating a Release -1. Tag the commit you would like to release from `master` and push the tags: +1. Tag the commit you would like to release from `master` and push the tags. This will trigger a GitHub workflow that creates a pre-release and pushes Docker images: ``` git fetch --tags git tag --annotate --message "" git push origin --tags ``` -2. Build and publish the release Docker images to Docker Hub by running `./pleasew run //scripts:publish-images` -3. In the GitHub web interface, you can then promote the new pre-release to a release +2. Once satisfied, promote the new pre-release to a release. diff --git a/scripts/pre-release.sh b/scripts/pre-release.sh index a8a4dac..a15a8af 100755 --- a/scripts/pre-release.sh +++ b/scripts/pre-release.sh @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +git fetch --tags --force version=$(git describe --always) github_api_version="application/vnd.github.v3+json"