feat: rebase on upstream v0.14.0 #22
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
pull_request: | |
jobs: | |
calculate-tag: | |
uses: ./.github/workflows/calculate-tag.yaml | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | |
- name: Setup Golang | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | |
with: | |
go-version-file: go.mod | |
- name: Test | |
run: make test | |
build: | |
runs-on: ubuntu-latest | |
needs: [ calculate-tag, test ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | |
- name: Setup Golang | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | |
with: | |
go-version-file: go.mod | |
- name: Build | |
run: make crossbuild | |
- name: Package | |
run: make crossbuild-tarballs | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: ./.build/*.tar.gz | |
publish: | |
runs-on: ubuntu-latest | |
needs: [ calculate-tag, build ] | |
permissions: write-all | |
if: contains(github.event.head_commit.message, 'pre-release') || startsWith(github.base_ref, '/refs/tags') | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Download artifacts | |
run: ls -ltr | |
- name: Create GH release | |
uses: softprops/action-gh-release@v1 | |
id: release | |
with: | |
generate_release_notes: true | |
target_commitish: "${{ github.base_ref }}" | |
tag_name: ${{ needs.calculate-tag.outputs.tag }} | |
prerelease: "${{ github.event_name == 'pull_request' }}" | |
files: | | |
*.tar.gz |