mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-29 18:21:10 +00:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
# This GitHub action can publish assets for release when a tag is created.
|
|
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
|
|
#
|
|
# This uses an action (crazy-max/ghaction-import-gpg) that assumes you set your
|
|
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
|
|
# secret. If you would rather own your own GPG handling, please fork this action
|
|
# or use an alternative one for key handling.
|
|
#
|
|
name: Publish Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Generate Short Lived OAuth App Token
|
|
uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0
|
|
id: app-token
|
|
with:
|
|
app-id: "${{ secrets.BOT_APP_ID }}"
|
|
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
|
|
owner: "${{ github.repository_owner }}"
|
|
repositories: "${{ github.event.repository.name }}"
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Import GPG key
|
|
id: import_gpg
|
|
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 #v6.1.0
|
|
with:
|
|
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
|
|
passphrase: "${{ secrets.PASSPHRASE }}"
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v5.0.0
|
|
with:
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GPG_FINGERPRINT: "${{ steps.import_gpg.outputs.fingerprint }}"
|
|
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
|