Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release workflow #78

Merged
merged 3 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ jobs:
uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: "1.14.5"

- uses: actions/cache@v1
- name: Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Install tools
run: |
./setup.sh
echo "::add-path::$(go env GOPATH)/bin"
run: ./setup.sh

- name: Check License Headers
run: mage -v checkLicenseHeaders
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,40 @@ jobs:
with:
fetch-depth: 0

- name: Tag
uses: tvdias/github-tagger@v0.0.2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.14.5"

- name: Cache
uses: actions/cache@v2
with:
repo-token: "${{ secrets.CI_TOKEN }}"
tag: "${{ github.event.inputs.version }}"
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Install tools
run: ./setup.sh

- name: Check License Headers
run: mage -v checkLicenseHeaders

- name: Lint
unguiculus marked this conversation as resolved.
Show resolved Hide resolved
run: mage -v lint

- name: Test
run: mage -v test

- name: Tag
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

tag='${{ github.event.inputs.version }}'
git tag --annotate --message "Tag for release $tag" "$tag"
git push origin "refs/tags/$tag"

- name: Release
run: mage -v release
env:
Expand Down