Repository navigation
chore: Self healing release #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
brunomenezes
wants to merge
3
commits into
prerelease/v2-alpha
Choose a base branch
from
ci/self-healing-release
base: prerelease/v2-alpha
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: cli-binaries | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| tag: | ||
| description: CLI release tag to build binaries for, e.g. @cartesi/cli@2.0.0-alpha.36 | ||
| type: string | ||
| required: true | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| upload: | ||
| name: Upload CLI binaries | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| # Build from the release tag, not the pushed commit, so the binaries | ||
| # match the version published on npm. | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: refs/tags/${{ inputs.tag }} | ||
|
|
||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | ||
|
|
||
| # The CLI build depends on @cartesi/devnet, which needs forge/anvil | ||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1 | ||
| with: | ||
| version: v1.4.3 | ||
|
|
||
| - name: Install Dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Build | ||
| run: bun run build --filter @cartesi/cli | ||
|
|
||
| - name: Upload binaries to the GitHub release | ||
| run: | | ||
| for f in cartesi-*; do tar -czf "$f.tar.gz" "$f"; done | ||
| # --clobber replaces assets left by a partial upload | ||
| gh release upload "$TAG" cartesi-*.tar.gz --clobber | ||
| working-directory: ./apps/cli/bin | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TAG: ${{ inputs.tag }} | ||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,14 @@ | ||
| name: sdk | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| # Lets release.yaml build images from a version tag, so a recovery | ||
| # run publishes exactly what was released. | ||
| ref: | ||
| description: "Git ref to build the images from, e.g. refs/tags/@cartesi/sdk@0.12.0-alpha.42 (default: triggering commit)" | ||
| type: string | ||
| required: false | ||
| default: "" | ||
|
Comment on lines
+8
to
+11
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. empty will be the commit that triggered the action. |
||
| secrets: | ||
| DOCKERHUB_USERNAME: | ||
| required: true | ||
|
|
@@ -30,6 +38,8 @@ jobs: | |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
|
|
||
| - name: Get package tag/version | ||
| id: package-version | ||
|
|
@@ -61,6 +71,8 @@ jobs: | |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
|
|
||
| - name: Download all docker-metadata artifacts | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.