Skip to content

Commit

Permalink
build(workflow): update CI to simplify release commands
Browse files Browse the repository at this point in the history
Replaced complex earthly-based release command with a `just` target in
the CI workflow for better maintainability. Added new `release`
commands to the Justfile for local, CI, and standard releases. This
streamlines the release process and enhances clarity.
  • Loading branch information
flemzord committed Dec 18, 2024
1 parent 5988029 commit 148930c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ jobs:
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: >
/nix/var/nix/profiles/default/bin/nix --extra-experimental-features "nix-command" --extra-experimental-features "flakes"
develop --impure --command earthly --no-output
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
+release --mode=ci
develop --impure --command just release-ci
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
Expand Down
6 changes: 0 additions & 6 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ openapi-markdown:
RUN widdershins openapi.yaml -o README.md --search false --language_tabs 'http:HTTP' --summary --omitHeader
SAVE ARTIFACT README.md AS LOCAL docs/api/README.md

release:
FROM core+builder-image
ARG mode=local
COPY --dir . /src
DO core+GORELEASER --mode=$mode

generate-client:
FROM node:20-alpine
RUN apk update && apk add yq jq
Expand Down
9 changes: 9 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ tests:
./...
@cat coverage.txt | grep -v debug.go | grep -v "/machine/" > coverage2.txt
@mv coverage2.txt coverage.txt

release-local:
@goreleaser release --nightly --skip=publish --clean

release-ci:
@goreleaser release --nightly --clean

release:
@goreleaser release --clean

0 comments on commit 148930c

Please sign in to comment.