fix github action auth

This commit is contained in:
LeonardoTrapani
2025-09-07 22:00:10 +02:00
parent e0d46836e3
commit c60d3b5acb
+16 -34
View File
@@ -5,6 +5,9 @@ on:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build and Release
@@ -49,14 +52,17 @@ jobs:
- name: Run tests
run: go test ./...
- name: Generate checksums
run: |
sha256sum hyprvoice-linux-x86_64 > hyprvoice-linux-x86_64.sha256
echo "Binary SHA256:"
cat hyprvoice-linux-x86_64.sha256
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.version.outputs.VERSION }}
tag_name: ${{ steps.version.outputs.VERSION }}
name: Release ${{ steps.version.outputs.VERSION }}
body: |
## Hyprvoice v${{ steps.version.outputs.VERSION }}
@@ -85,31 +91,7 @@ jobs:
- OpenAI API key for transcription
**Full Changelog**: https://github.com/leonardotrapani/hyprvoice/commits/v${{ steps.version.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hyprvoice-linux-x86_64
asset_name: hyprvoice-linux-x86_64
asset_content_type: application/octet-stream
- name: Upload checksums
run: |
sha256sum hyprvoice-linux-x86_64 > hyprvoice-linux-x86_64.sha256
echo "Binary SHA256:"
cat hyprvoice-linux-x86_64.sha256
- name: Upload checksum file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hyprvoice-linux-x86_64.sha256
asset_name: hyprvoice-linux-x86_64.sha256
asset_content_type: text/plain
files: |
./hyprvoice-linux-x86_64
./hyprvoice-linux-x86_64.sha256
token: ${{ secrets.GITHUB_TOKEN }}