Skip to content

fix: Return proper exit code. Fixes #54 #161

fix: Return proper exit code. Fixes #54

fix: Return proper exit code. Fixes #54 #161

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21.5'
- name: Irt GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Set up Snapcraft
shell: bash
run: |
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
- name: Snapcraft Login
if: success() && startsWith(github.ref, 'refs/tags/v')
shell: bash
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
snapcraft login
- name: Get Dependencies
shell: bash
run: go get ./...
- name: Test
shell: bash
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
- name: GoReleaser Snapshot
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: build --snapshot
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_CLIENT_ID: ${{ secrets.MASTODON_CLIENT_ID }}
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}