-
Notifications
You must be signed in to change notification settings - Fork 108
ci: add apisix-runtime release assets workflow #464
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7b18dd2
ci: add apisix-runtime release assets workflow
jarvis9443 d769e66
ci: harden apisix-runtime release workflow
jarvis9443 bcd2d15
fix: support apisix-runtime debug deb packaging
jarvis9443 8939289
ci: make runtime release creation idempotent
jarvis9443 caca120
ci: validate apisix-runtime release input
jarvis9443 b2e758a
ci: run apisix-runtime release on publish
jarvis9443 efa1544
ci: checkout apisix-runtime release tag
jarvis9443 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,71 @@ | ||
| name: Release apisix-runtime | ||
|
|
||
| on: | ||
| release: | ||
| types: | ||
| - published | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "apisix-runtime version to release" | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'apisix-runtime/') | ||
| timeout-minutes: 90 | ||
| env: | ||
| RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || format('apisix-runtime/{0}', github.event.inputs.version) }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: | ||
| - runner: ubuntu-24.04 | ||
| arch: amd64 | ||
| build_arch: linux/amd64 | ||
| - runner: ubuntu-24.04-arm | ||
| arch: arm64 | ||
| build_arch: linux/arm64/v8 | ||
| runs-on: ${{ matrix.platform.runner }} | ||
| steps: | ||
| - name: Resolve release version | ||
| run: | | ||
| version="${RELEASE_TAG#apisix-runtime/}" | ||
| if [[ "$version" == "$RELEASE_TAG" || ! "$version" =~ ^[0-9A-Za-z._-]+$ ]]; then | ||
| echo "invalid release tag: $RELEASE_TAG" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "VERSION=$version" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ env.RELEASE_TAG }} | ||
|
|
||
|
jarvis9443 marked this conversation as resolved.
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y make ruby ruby-dev rubygems build-essential | ||
|
|
||
| - name: Build apisix-runtime deb | ||
| run: | | ||
| make package type=deb app=apisix-runtime runtime_version="${VERSION}" image_base=debian image_tag=bookworm-slim arch=${{ matrix.platform.build_arch }} | ||
|
|
||
| - name: Build apisix-runtime-debug deb | ||
| run: | | ||
| make package type=deb app=apisix-runtime runtime_version="${VERSION}" image_base=debian image_tag=bookworm-slim arch=${{ matrix.platform.build_arch }} build_latest=latest artifact=apisix-runtime-debug | ||
|
|
||
| - name: Upload release assets | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh release view "$RELEASE_TAG" >/dev/null | ||
| gh release upload "$RELEASE_TAG" \ | ||
| "./output/apisix-runtime_${VERSION}-0~debianbookworm-slim_${{ matrix.platform.arch }}.deb" \ | ||
| "./output/apisix-runtime-debug_${VERSION}-0~debianbookworm-slim_${{ matrix.platform.arch }}.deb" \ | ||
| --clobber | ||
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
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.