Commit Graph

3 Commits

Author SHA1 Message Date
Gerhard Lazu
8682f63aaa
Unblock auto-releases
Last time this ran, GoReleaser built an artefact with the wrong version
- it didn't bump it correctly. It was meant to build 0.1.0-alpha.33, but
it built 0.1.0-alpha.32 instead:
https://github.com/dagger/dagger/runs/4860126130?check_suite_focus=true#step:7:94

This new approach is a simpler and more explicit tag bump by leveraging
the semver-tool directly. A link to this utility is included in the
comments. We version it in this repository so that it is all
self-contained.

We also use the gh CLI tool directly, instead of a GitHub Action that
hides the implementation detail behind Typescript. We now have two very
simple gh CLI invocations that do all that. While we still use the
https://github.com/lewagon/wait-on-check-action GitHub Action to wait
on running checks, and abort if any check failed, I didn't want to
bundle that improvement into this PR - it's already big enough.

As a meaningful improvement, we should have a Dagger package that bumps
versions.  It would have been so much easier to use that Dagger package.
That implies us switching our GitHub Actions to Dagger, which we should
totally do. Small steps ftw!

Next step: run 0.1.0 release manually
Step 2: run 0.2.0-alpha.1 release manually
Step 3: wait for 0.2.0-alpha.2 to be produced automatically, tomorrow.

Pair: @aluzzardi

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2022-01-25 11:42:46 +00:00
Gerhard Lazu
c5c4fdac29
Fix running-workflow-name in bump_version-tag-release job
This will prevent the job waiting on itself to complete (which will not
happen until GitHub Actions kills the run).

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2022-01-18 22:02:28 +00:00
Gerhard Lazu
59e9fae189
Also release in the Trigger Release workflow
The first implementation of the trigger-release would not push a tag,
meaning that the Release workflow was not getting triggered. While we
could have changed the Release workflow to react on "Trigger Release"
workflow runs, the inter-dependency felt awkward and brittle:

    diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
    index b711c5cf..843fdb70 100644
    --- a/.github/workflows/release.yml
    +++ b/.github/workflows/release.yml
    @@ -7,10 +7,16 @@ on:
       push:
         tags:
         - v*
    +  workflow_run:
    +    workflows:
    +    - "Trigger Release"
    +    types:
    +    - completed

     jobs:
       goreleaser:
         runs-on: ubuntu-latest
    +    if: ${{ github.event.workflow_run.conclusion == 'success' }}
         defaults:
           run:
             shell: bash

Instead of doing the above, introducing duplication between "Trigger
Release" and "Release" seemed simpler from a cognitive perspective. Now,
releases are produced via the Release workflow when tags are pushed, and
also when releases are triggered via "Trigger Release", now renamed to
"Auto Release".

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2022-01-18 18:59:50 +00:00