Skip to content

Commit

Permalink
fix(ci): set goreleaser and sem release to use custom token
Browse files Browse the repository at this point in the history
To get the Go Releaser workflow triggered on commit push, a custom token
needs to be used instead of the GITHUB_TOKEN. This is due to the API and
how it triggers workflows based on events
  • Loading branch information
Adriel Perkins committed Jun 21, 2022
1 parent 60e166b commit 27f1027
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gorelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SCHEMACHECK_RELEASE_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/main.yaml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/semrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
name: Semantic Release

on:
workflow_call:
push:
branches: [ main ]

jobs:

test-check-go:
uses: ./.github/workflows/test-check-go.yaml

semrelease:

name: Sem Release
runs-on: ubuntu-latest
needs: test-check-go

steps:
- name: Checkout source
uses: actions/checkout@v2

- uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.SCHEMACHECK_RELEASE_TOKEN }}
changelog-generator-opt: "emojis=true"
2 changes: 2 additions & 0 deletions .github/workflows/test-check-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
name: Make Test and Checks

on:
pull_request:
branches: [ main ]
workflow_call:

jobs:
Expand Down

0 comments on commit 27f1027

Please sign in to comment.