feat: improved markdown output #628
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: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: go-setup | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19 | |
- name: install snapcraft | |
run: | | |
sudo apt-get update | |
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft | |
mkdir -p $HOME/.cache/snapcraft/download | |
mkdir -p $HOME/.cache/snapcraft/stage-packages | |
- name: goreleaser-setup | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
install-only: true | |
- if: startsWith(github.ref, 'refs/tags/') | |
name: release a new version | |
run: | | |
make release "tag=${GITHUB_REF#refs/tags/}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_GORELEASER }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
- if: startsWith(github.ref, 'refs/tags/') == false | |
name: test releasing a snapshot version | |
run: make release SNAPSHOT=1 tag=Unreleased | |
- if: startsWith(github.ref, 'refs/tags/') | |
name: trigger Netlify deploy with new release | |
run: | | |
curl -vs -X POST "https://api.netlify.com/build_hooks/${NETLIFY_HOOK}" \ | |
--data-urlencode "trigger_title=triggered+by github actions (tag: ${GITHUB_REF#refs/tags/})" \ | |
--data-urlencode "trigger_branch=main" | |
env: | |
NETLIFY_HOOK: ${{ secrets.NETLIFY_HOOK }} |