fix: updated publish pipeline #3
1 changed files with 13 additions and 3 deletions
16
.github/workflows/publish.yaml
vendored
16
.github/workflows/publish.yaml
vendored
|
|
@ -1,7 +1,6 @@
|
||||||
name: Publish
|
name: Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
|
@ -15,7 +14,7 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
config:
|
config:
|
||||||
name: Check GoReleaser config
|
name: Check GoReleaser config
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -28,7 +27,7 @@ jobs:
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: "Publish provider"
|
name: "Publish provider"
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
|
||||||
needs: config
|
needs: config
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -81,6 +80,7 @@ jobs:
|
||||||
gpg --import private.key
|
gpg --import private.key
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
id: goreleaser
|
id: goreleaser
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -89,6 +89,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
args: release --skip publish --clean --snapshot
|
args: release --skip publish --clean --snapshot
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
|
id: goreleaser
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
args: release --skip publish --clean
|
||||||
|
|
||||||
- name: Prepare key file
|
- name: Prepare key file
|
||||||
run: |
|
run: |
|
||||||
echo $(echo ${{ secrets.KEY_FILE_B64 }} | base64 -d) >public_key.pem
|
echo $(echo ${{ secrets.KEY_FILE_B64 }} | base64 -d) >public_key.pem
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue