Skip to content

Commit

Permalink
ci: Switch from goreleaser to release-please. (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoido authored Dec 10, 2023
1 parent 5b61948 commit 311a1c6
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 36 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ jobs:
uses: ./.github/workflows/go-test.yaml

secrets: inherit

checks-passed:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: "Checks Passed"
runs-on: ubuntu-latest
needs: [lint, build, test]
steps:
- run: echo "All required passed!" >> $GITHUB_STEP_SUMMARY
31 changes: 0 additions & 31 deletions .github/workflows/goreleaser.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
workflow_run:
workflows: ["Go"]
branches: [main]
types:
- completed

concurrency:
group: release-please-${{ github.ref }}

jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest

if: github.event.workflow_run.conclusion == 'success'

permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: google-github-actions/release-please-action@v4

fail-release:
name: Fail Release
runs-on: ubuntu-latest

if: github.event.workflow_run.conclusion == 'failure'

steps:
- run: |
echo "::error ::Cannot release unless 'Go' workflow suceeds!"
exit 1
5 changes: 0 additions & 5 deletions .goreleaser.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.1.0"
}
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "go",
"draft-pull-request": true
}
},
"pull-request-title-pattern": "chore: 🔖 release${component} ${version}",
"separate-pull-requests": true,
"draft-pull-request": true,
"plugins": [
"sentence-case"
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit 311a1c6

Please sign in to comment.