Skip to content

Commit

Permalink
ci: integrate test and release jobs into one
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Apr 20, 2021
1 parent bf10f06 commit f5279f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 49 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- 'v*.*.*'
paths-ignore:
- '**.md'
pull_request:
Expand Down Expand Up @@ -52,3 +54,23 @@ jobs:
- run: mage install
- run: tss version
- run: tss -h

release:
runs-on: ubuntu-18.04
needs: test
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

# https://github.com/peaceiris/workflows/blob/main/setup-goreleaser/action.yml
- uses: peaceiris/workflows/setup-goreleaser@v0.8.1

- name: goreleaser release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
RELEASE_NOTES="See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details."
goreleaser release --rm-dist --release-notes <(echo ${RELEASE_NOTES})
49 changes: 0 additions & 49 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit f5279f7

Please sign in to comment.