| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- name: Release
- # Controls when the workflow will run
- on:
- release:
- types: [published]
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup Go
- uses: actions/setup-go@v2
- with:
- go-version: ^1.17.1
- - name: Cache go module
- uses: actions/cache@v2
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
- - name: Build
- if: startsWith(github.ref, 'refs/tags/')
- env:
- NAME: oci-help
- BINDIR: build
- run: |
- make release -j$(nproc)
- - name: Upload Release
- uses: softprops/action-gh-release@v1
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: build/*.zip
|