feat(release): prepare winget package #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: Release | |
on: | |
push: | |
tags: | |
- "*" | |
permissions: | |
checks: write | |
contents: write | |
packages: write | |
pull-requests: write | |
pages: write | |
id-token: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
fetch-tags: 'true' | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
# Semantic version range syntax or exact version of Go | |
go-version: '1.22.x' | |
- name: Setup Syft | |
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- run: gem install asciidoctor | |
- name: Install Go tools | |
run: | | |
go install gotest.tools/gotestsum@latest | |
go install mvdan.cc/garble@latest | |
- name: Init go | |
run: | | |
go mod download | |
go generate . | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
- name: Test | |
run: | | |
gotestsum --format pkgname -- -covermode=atomic ./... | |
- name: Prepare GPG setup | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/.gnupg | |
echo "${{ secrets.GPG_SIGNING_KEY }}" | base64 -d > $GITHUB_WORKSPACE/.gnupg/gpg.key | |
- name: Release | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_TAP_PAT: ${{ secrets.GH_TAP_PAT }} | |
GH_WINGET_PAT: ${{ secrets.GH_WINGET_PAT }} | |
GH_SCOOP_PAT: ${{ secrets.GH_SCOOP_PAT }} | |
NFPM_GIT_AGE_PASSPHRASE: ${{ secrets.NFPM_GIT_AGE_PASSPHRASE }} | |
- name: Upload RPM packages | |
run: | | |
for rpm in dist/*.rpm; do | |
curl --user prskr:${{ secrets.UPLOAD_RPM_SECRET }} \ | |
--upload-file "${rpm}" \ | |
https://code.icb4dc0.de/api/packages/prskr/rpm/upload | |
done | |
- name: Upload DEB packages | |
run: | | |
for deb in dist/*.deb; do | |
curl --user prskr:${{ secrets.UPLOAD_DEB_SECRET }} \ | |
--upload-file "${deb}" \ | |
https://code.icb4dc0.de/api/packages/prskr/debian/pool/bookworm/main/upload | |
done | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'out/html/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |