Skip to content

Commit

Permalink
support multiple arch and set proper channel
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Jan 30, 2024
1 parent 804313e commit 245fa6f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/release-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
if [[ "${VERSION}" == "${BRANCH_NAME}" ]]; then
VERSION=$(git rev-parse --short HEAD)
fi
PRERELEASE=${VERSION#*-rc}
if [[ -z "$PRERELEASE" || "$PRERELEASE" == "$VERSION" ]]; then
echo "release=stable" >> $GITHUB_OUTPUT
else
echo "release=candidate" >> $GITHUB_OUTPUT
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: make snapcraft
run: |
Expand All @@ -42,8 +48,24 @@ jobs:
- uses: snapcore/action-build@v1
id: build
- uses: snapcore/action-publish@v1
name: publish amd64
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: 'oras_${{ steps.version.outputs.version }}_amd64.snap'
release: ${{ steps.version.outputs.release }}
- uses: snapcore/action-publish@v1
name: publish arm64
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: 'oras_${{ steps.version.outputs.version }}_arm64.snap'
release: ${{ steps.version.outputs.release }}
- uses: snapcore/action-publish@v1
name: publish s390x
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
snap: 'oras_${{ steps.version.outputs.version }}_s390x.snap'
release: ${{ steps.version.outputs.release }}

0 comments on commit 245fa6f

Please sign in to comment.