feat(vault)!: remove support for ENCRYPTED_VAULT_TOKEN (#251) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_PRIVATE_KEY }} | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ steps.token.outputs.token }} | |
skip-github-pull-request: "${{ contains(github.event.head_commit.message, 'chore: release') }}" | |
- if: steps.release.outputs.release_created | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
script: | | |
const tag = '${{ steps.release.outputs.tag_name }}'; | |
// Create annotated tag | |
const result = await github.rest.git.createTag({ | |
...context.repo, | |
tag, | |
message: `Release ${tag}`, | |
type: 'commit', | |
object: context.sha, | |
}); | |
const sha = result.data.sha; | |
// Create the ref | |
await github.rest.git.createRef({ | |
...context.repo, | |
sha, | |
ref: `refs/tags/${tag}`, | |
}); | |
core.setOutput('sha', sha); | |
outputs: | |
released: ${{ steps.release.outputs.release_created }} | |
goreleaser: | |
runs-on: ubuntu-latest | |
needs: release | |
if: needs.release.outputs.released | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
cache: true | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |