switch to softprops/action-gh-release

This commit is contained in:
Yasuhiro Matsumoto
2026-01-17 15:40:45 +09:00
parent c6da13649d
commit 120a92920e

View File

@@ -9,19 +9,8 @@ permissions:
contents: write contents: write
jobs: jobs:
make-release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
build-all-for-all: build-all-for-all:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs:
- make-release
strategy: strategy:
matrix: matrix:
goos: [linux, freebsd, windows] goos: [linux, freebsd, windows]
@@ -40,16 +29,14 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }} goarch: ${{ matrix.goarch }}
ldflags: -X main.version=${{ github. ref_name }} ldflags: -X main.version=${{ github.ref_name }}
overwrite: true overwrite: true
md5sum: false md5sum: false
sha256sum: false sha256sum: false
compress_assets: false compress_assets: false
build-darwin: build-darwin:
runs-on: macos-latest runs-on: macos-latest
needs:
- make-release
strategy: strategy:
matrix: matrix:
goarch: [amd64, arm64] goarch: [amd64, arm64]
@@ -68,14 +55,10 @@ jobs:
run: | run: |
go build -ldflags "-X main.version=${{ github.ref_name }}" -o nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }} go build -ldflags "-X main.version=${{ github.ref_name }}" -o nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
- name: Upload Release Asset - name: Upload Release Asset
uses: actions/upload-release-asset@v1 uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
with: with:
upload_url: ${{ needs.make-release.outputs.upload_url }} files: ./nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
asset_path: ./nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
asset_name: nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
asset_content_type: application/octet-stream
smoke-test-linux-amd64: smoke-test-linux-amd64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
@@ -131,7 +114,7 @@ jobs:
# test NIP-49 key encryption/decryption # test NIP-49 key encryption/decryption
echo "testing NIP-49 key encryption/decryption..." echo "testing NIP-49 key encryption/decryption..."
ENCRYPTED_KEY=$(./nak key encrypt $SECRET_KEY "testpassword") ENCRYPTED_KEY=$(./nak key encrypt $SECRET_KEY "testpassword")
echo "encrypted key: ${ENCRYPTED_KEY:0:20}..." echo "encrypted key: ${ENCRYPTED_KEY: 0:20}..."
DECRYPTED_KEY=$(./nak key decrypt $ENCRYPTED_KEY "testpassword") DECRYPTED_KEY=$(./nak key decrypt $ENCRYPTED_KEY "testpassword")
if [ "$DECRYPTED_KEY" != "$SECRET_KEY" ]; then if [ "$DECRYPTED_KEY" != "$SECRET_KEY" ]; then
echo "nip-49 encryption/decryption test failed!" echo "nip-49 encryption/decryption test failed!"