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
|
2019-09-20 20:23:45 +00:00
|
|
|
push:
|
2019-10-04 14:23:35 +00:00
|
|
|
branches:
|
2020-12-01 19:40:45 +00:00
|
|
|
- 'master'
|
|
|
|
- 'releases/v*'
|
2020-12-01 19:41:26 +00:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2020-12-01 19:40:45 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '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
|
2020-11-29 23:57:19 +00:00
|
|
|
- v0.145.0
|
2019-09-20 20:23:45 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2021-05-12 13:11:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
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-11-29 23:57:19 +00:00
|
|
|
go-version: 1.15
|
2020-02-11 12:52:06 +00:00
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.version }}
|
|
|
|
args: check --debug
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
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
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
2020-05-10 14:02:05 +00:00
|
|
|
|
2020-11-06 20:18:48 +00:00
|
|
|
install-only:
|
2020-11-06 20:30:01 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-06 20:18:48 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
version:
|
|
|
|
- latest
|
2020-11-29 23:57:19 +00:00
|
|
|
- v0.145.0
|
2020-11-06 20:18:48 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2021-05-12 13:11:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-11-06 20:18:48 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
-
|
|
|
|
name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2020-11-29 23:57:19 +00:00
|
|
|
go-version: 1.15
|
2020-11-06 20:18:48 +00:00
|
|
|
-
|
|
|
|
name: GoReleaser
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.version }}
|
|
|
|
install-only: true
|
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
run: |
|
|
|
|
goreleaser check --debug
|
|
|
|
|
2020-05-10 14:02:05 +00:00
|
|
|
signing:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-11-06 19:48:03 +00:00
|
|
|
if: github.event_name != 'pull_request'
|
2020-05-10 14:02:05 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macOS-latest
|
|
|
|
- windows-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2021-05-12 13:11:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-06-15 16:36:44 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-05-10 14:02:05 +00:00
|
|
|
-
|
|
|
|
name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2020-11-29 23:57:19 +00:00
|
|
|
go-version: 1.15
|
2020-05-10 14:02:05 +00:00
|
|
|
-
|
|
|
|
name: Import GPG key
|
2020-05-10 16:42:15 +00:00
|
|
|
id: import_gpg
|
2020-09-07 13:40:41 +00:00
|
|
|
uses: crazy-max/ghaction-import-gpg@v3
|
|
|
|
with:
|
|
|
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
|
|
|
|
passphrase: ${{ secrets.PASSPHRASE_TEST }}
|
2020-05-10 14:02:05 +00:00
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: -f .goreleaser-signing.yml check --debug
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
2020-05-10 16:42:15 +00:00
|
|
|
env:
|
|
|
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
2020-05-10 14:02:05 +00:00
|
|
|
-
|
|
|
|
name: GoReleaser
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: -f .goreleaser-signing.yml release --skip-publish --rm-dist
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
2020-05-10 16:42:15 +00:00
|
|
|
env:
|
|
|
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
2020-11-29 23:57:19 +00:00
|
|
|
|
|
|
|
upload-artifact:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2021-05-12 13:11:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-11-29 23:57:19 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
-
|
|
|
|
name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.15
|
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
args: check --debug
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
2020-11-29 23:57:19 +00:00
|
|
|
-
|
|
|
|
name: GoReleaser
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
args: release --skip-publish --rm-dist
|
2021-03-30 21:48:02 +00:00
|
|
|
workdir: ./test
|
2020-11-29 23:57:19 +00:00
|
|
|
-
|
|
|
|
name: Upload assets
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: myapp
|
2021-03-30 21:48:02 +00:00
|
|
|
path: ./test/dist/*
|