Skip to content

Merge pull request #219 from smlx/docs-bitrot #97

Merge pull request #219 from smlx/docs-bitrot

Merge pull request #219 from smlx/docs-bitrot #97

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
tag:
runs-on: ubuntu-latest
outputs:
new-tag: ${{ steps.bump-tag.outputs.new }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install ccv
run: >
curl -sSL https://github.com/smlx/ccv/releases/download/v0.3.2/ccv_0.3.2_linux_amd64.tar.gz
| sudo tar -xz -C /usr/local/bin ccv
- name: Bump tag if necessary
id: bump-tag
run: |
if [ -z $(git tag -l $(ccv)) ]; then
git tag $(ccv)
git push --tags
echo "new=true" >> $GITHUB_OUTPUT
fi
release:
needs: tag
if: needs.tag.outputs.new-tag == 'true'
strategy:
# avoid concurrent goreleaser runs
max-parallel: 1
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
- name: Set up environment
run: echo "GOVERSION=$(go version)" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist --config .goreleaser.${{ matrix.os }}.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}