mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-28 16:07:46 +00:00
65 lines
1.9 KiB
YAML
65 lines
1.9 KiB
YAML
name: Release YQ
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v4.*'
|
|
- 'draft-*'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
publishGitRelease:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version: '^1.20'
|
|
check-latest: true
|
|
- name: Compile man page markup
|
|
id: gen-man-page-md
|
|
run: |
|
|
./scripts/generate-man-page-md.sh
|
|
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo "VERSION=${GITHUB_REF##*/}" >> "${GITHUB_OUTPUT}"
|
|
|
|
- name: Generate man page
|
|
uses: docker://pandoc/core:2.14.2@sha256:04e127c6642a2b9d447c26fe0ac6a5932efa8f508eda9f07da51b6e621dd7c19
|
|
id: gen-man-page
|
|
with:
|
|
args: >-
|
|
--standalone
|
|
--to man
|
|
--variable=title:"YQ"
|
|
--variable=section:"1"
|
|
--variable=header:"yq (https://github.com/mikefarah/yq/) version ${{ steps.get_version.outputs.VERSION }}"
|
|
--variable=author:"Mike Farah"
|
|
--output=yq.1
|
|
man.md
|
|
|
|
- name: Install cosign
|
|
uses: sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5 # v3.10.1
|
|
|
|
- name: Cross compile
|
|
run: |
|
|
sudo apt-get install rhash -y
|
|
go install github.com/goreleaser/goreleaser/v2@v2.16.0
|
|
./scripts/xcompile.sh
|
|
|
|
- name: Sign checksums
|
|
run: |
|
|
cosign sign-blob --yes --bundle build/checksums.bundle build/checksums
|
|
cosign sign-blob --yes --bundle build/checksums-bsd.bundle build/checksums-bsd
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
|
with:
|
|
files: build/*
|
|
draft: true
|
|
fail_on_unmatched_files: true
|