feat: function commands #85
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: goreleaser | |
on: | |
pull_request: | |
push: | |
# run only against tags | |
tags: | |
- "*" | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
# GPG for signing | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_KEY }} | |
fingerprint: ${{ secrets.GPG_FINGERPRINT }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
# Gorelease full | |
- name: Run GoReleaser (full release, on tag) | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: "~> v2" | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | |
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }} | |
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }} | |
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }} | |
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }} | |
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }} | |
QUILL_LOG_LEVEL: "debug" | |
# Gorelease build only | |
- name: Run GoReleaser (build only, on PR) | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: "~> v2" | |
args: build --snapshot --clean | |
- name: Upload assets | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qernal-cli | |
path: dist/ |