fix(ci): configure more platforms for Docker #8
This file contains 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
--- | |
name: Release Flow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
uses: ./.github/workflows/job-lint.yml | |
test: | |
uses: ./.github/workflows/job-test.yml | |
release: | |
needs: | |
- test | |
- lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.ZEBRADIL_BOT_GPG_PRIVATE_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ZEBRADIL_BOT_GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: Zebradli Bot | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: Zebradli Bot | |
GIT_COMMITTER_EMAIL: [email protected] | |
with: | |
extra_plugins: | | |
@semantic-release/git | |
- name: Install GoReleaser | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
install-only: true | |
- name: Setup QEMU | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: docker/setup-buildx-action@v2 | |
- name: Publish release | |
if: steps.semantic.outputs.new_release_published == 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
goreleaser release --clean \ | |
--release-notes <(echo "${{ steps.semantic.outputs.new_release_notes }}") |