Skip to content

Commit

Permalink
GH action fixes for proper ghcr permissions and checksums upload
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyLV committed May 22, 2024
1 parent 4dbb9e7 commit 22ac691
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ on:
- "*"

permissions:
contents: write
packages: write

jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Login to Github Container registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -46,6 +49,15 @@ jobs:
args: release --clean --skip-publish --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
-
name: Run GoReleaser release and publish
uses: goreleaser/goreleaser-action@v5
Expand All @@ -56,3 +68,13 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload windows artifact
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/checksums.txt
asset_name: checksums.txt
asset_content_type: text/plain

0 comments on commit 22ac691

Please sign in to comment.