Build and release (started by @HCastano) #280
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and release | |
run-name: Build and release (started by @${{ github.triggering_actor }}) | |
on: | |
push: | |
tags: | |
# First, match SemVer.org conformant tags in the `release/` tagspace. | |
- release/v[0-9]+.[0-9]+.[0-9]+-?** # Release, or pre-release build. | |
- release/v[0-9]+.[0-9]+.[0-9]+\+?** # Release with build identifier. | |
# Then, also, basically any release-ish name in the `test/` tagspace. | |
- test/**release/** | |
schedule: | |
# Build the default branch weekly. Our version of "nightly." | |
- cron: 55 4 * * 0 # Every Sunday at 4:55 AM. | |
jobs: | |
git-ref-basename: | |
uses: ./.github/workflows/git-ref-basename.yaml | |
build-entropy: | |
uses: ./.github/workflows/container-build-and-push.yaml | |
needs: | |
- git-ref-basename | |
with: | |
docker_build_arg_package: entropy | |
git_ref_basename: ${{ needs.git-ref-basename.outputs.git_ref_basename }} | |
secrets: | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_CI_TOKEN: ${{ secrets.DOCKER_HUB_CI_TOKEN }} | |
CI_MACHINE_USER_TOKEN: ${{ secrets.CI_MACHINE_USER_TOKEN }} | |
build-entropy-tss: | |
uses: ./.github/workflows/container-build-and-push.yaml | |
needs: | |
- git-ref-basename | |
with: | |
docker_build_arg_package: entropy-tss | |
git_ref_basename: ${{ needs.git-ref-basename.outputs.git_ref_basename }} | |
secrets: | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_CI_TOKEN: ${{ secrets.DOCKER_HUB_CI_TOKEN }} | |
CI_MACHINE_USER_TOKEN: ${{ secrets.CI_MACHINE_USER_TOKEN }} | |
release: | |
name: Publish new release | |
if: github.event_name != 'schedule' | |
needs: | |
- git-ref-basename | |
- build-entropy | |
- build-entropy-tss | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: "!*.dockerbuild" | |
- name: Create release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release create \ | |
--draft \ | |
--target "${{ github.sha }}" \ | |
--title "${{ needs.build.outputs.git_ref_basename }}" \ | |
$(echo ${{ github.ref_name }} | grep --quiet -E '^test|v[0-9]\.[0-9]\.[0-9]-' && echo '--prerelease') \ | |
--verify-tag "${{ github.ref_name }}" \ | |
{entropy,entropy-tss}_${{ needs.git-ref-basename.outputs.git_ref_basename }}/* |