1.5.2: force alphanumeric sort of commands #44
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: goreleaser | |
on: | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fetch all tags | |
run: git fetch --force --tags | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21.x | |
- name: Install Snapcraft | |
uses: samuelmeuli/action-snapcraft@v1 | |
- name: Prevent from snapcraft fail | |
run: | | |
mkdir -p $HOME/.cache/snapcraft/download | |
mkdir -p $HOME/.cache/snapcraft/stage-packages | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
- name: Publish to NPM and Rubygems | |
env: | |
NPM_API_KEY: ${{ secrets.NPM_API_KEY }} | |
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
run: | | |
cat << EOF > ~/.npmrc | |
//registry.npmjs.org/:_authToken=${NPM_API_KEY} | |
EOF | |
chmod 0600 ~/.npmrc | |
mkdir -p ~/.gem/ | |
cat << EOF > ~/.gem/credentials | |
--- | |
:rubygems_api_key: ${RUBYGEMS_API_KEY} | |
EOF | |
chmod 0600 ~/.gem/credentials | |
cd packaging/ | |
make prepare | |
make publish | |
- name: Update Homebrew formula | |
uses: dawidd6/action-homebrew-bump-formula@v3 | |
with: | |
formula: lefthook | |
token: ${{secrets.HOMEBREW_TOKEN}} | |
- name: Publish to Winget | |
uses: vedantmgoyal2009/winget-releaser@v2 | |
with: | |
identifier: evilmartians.lefthook | |
fork-user: mrexox | |
token: ${{ secrets.WINGET_TOKEN }} |