goreleaser-action/.github/workflows/ci.yml

126 lines
2.6 KiB
YAML
Raw Normal View History

2019-09-22 05:17:07 +00:00
name: ci
2019-09-20 20:23:45 +00:00
on:
2020-05-23 23:15:17 +00:00
schedule:
- cron: '0 10 * * *' # everyday at 10am
pull_request:
branches:
- master
- releases/v*
2019-09-20 20:23:45 +00:00
push:
branches:
2020-05-23 23:15:17 +00:00
- master
- releases/v*
2019-09-20 20:23:45 +00:00
jobs:
2019-09-22 05:17:07 +00:00
ci:
2019-09-20 20:23:45 +00:00
runs-on: ${{ matrix.os }}
strategy:
2019-09-22 05:17:07 +00:00
fail-fast: false
2019-09-20 20:23:45 +00:00
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
version:
- latest
- v0.117.0
steps:
-
name: Checkout
2020-11-06 20:26:05 +00:00
uses: actions/checkout@v2
2020-06-15 16:36:44 +00:00
with:
fetch-depth: 0
2019-09-20 20:23:45 +00:00
-
name: Set up Go
2020-05-06 21:12:22 +00:00
uses: actions/setup-go@v2
2019-12-24 10:37:15 +00:00
with:
2020-05-10 14:15:33 +00:00
go-version: 1.14
-
name: Check
uses: ./
with:
version: ${{ matrix.version }}
args: check --debug
2019-09-20 20:23:45 +00:00
-
name: GoReleaser
uses: ./
with:
version: ${{ matrix.version }}
2019-09-20 21:14:11 +00:00
args: release --skip-publish --rm-dist
install-only:
2020-11-06 20:30:01 +00:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- latest
- v0.117.0
steps:
-
name: Checkout
2020-11-06 20:26:05 +00:00
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: GoReleaser
uses: ./
with:
version: ${{ matrix.version }}
install-only: true
-
name: Check
run: |
goreleaser check --debug
signing:
runs-on: ${{ matrix.os }}
2020-11-06 19:48:03 +00:00
if: github.event_name != 'pull_request'
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
-
name: Checkout
2020-11-06 20:26:05 +00:00
uses: actions/checkout@v2
2020-06-15 16:36:44 +00:00
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
2020-05-10 14:15:33 +00:00
go-version: 1.14
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
passphrase: ${{ secrets.PASSPHRASE_TEST }}
-
name: Check
uses: ./
with:
version: latest
args: -f .goreleaser-signing.yml check --debug
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
-
name: GoReleaser
uses: ./
with:
version: latest
args: -f .goreleaser-signing.yml release --skip-publish --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}