Compare commits

...

6 Commits

Author SHA1 Message Date
mattn
c2969ba503 Merge pull request #2 from mattn/copilot/fix-fuse-installation-issue
Switch to softprops/action-gh-release and add FUSE dependencies
2026-01-17 16:18:43 +09:00
copilot-swe-agent[bot]
235e16d34b Switch build-all-for-all to softprops/action-gh-release
Co-authored-by: mattn <10111+mattn@users.noreply.github.com>
2026-01-17 07:15:33 +00:00
copilot-swe-agent[bot]
e44dd08527 Add FUSE dependencies installation to build-all-for-all job
Co-authored-by: mattn <10111+mattn@users.noreply.github.com>
2026-01-17 07:02:39 +00:00
copilot-swe-agent[bot]
d856f54394 Initial plan 2026-01-17 07:00:46 +00:00
mattn
d015e979aa Merge pull request #1 from mattn/fix-workflows
Fix workflows
2026-01-17 15:43:19 +09:00
Yasuhiro Matsumoto
120a92920e switch to softprops/action-gh-release 2026-01-17 15:41:36 +09:00

View File

@@ -9,19 +9,8 @@ permissions:
contents: write
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:
runs-on: ubuntu-latest
needs:
- make-release
strategy:
matrix:
goos: [linux, freebsd, windows]
@@ -35,21 +24,27 @@ jobs:
goos: freebsd
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.40
- name: Set up Go
uses: actions/setup-go@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
ldflags: -X main.version=${{ github. ref_name }}
overwrite: true
md5sum: false
sha256sum: false
compress_assets: false
go-version: 'stable'
- name: Install FUSE dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfuse-dev
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -ldflags "-X main.version=${{ github.ref_name }}" -o nak-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: ./nak-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}
build-darwin:
runs-on: macos-latest
needs:
- make-release
strategy:
matrix:
goarch: [amd64, arm64]
@@ -68,14 +63,10 @@ jobs:
run: |
go build -ldflags "-X main.version=${{ github.ref_name }}" -o nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ needs.make-release.outputs.upload_url }}
asset_path: ./nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
asset_name: nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
asset_content_type: application/octet-stream
files: ./nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
smoke-test-linux-amd64:
runs-on: ubuntu-latest
needs:
@@ -131,7 +122,7 @@ jobs:
# test NIP-49 key encryption/decryption
echo "testing NIP-49 key encryption/decryption..."
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")
if [ "$DECRYPTED_KEY" != "$SECRET_KEY" ]; then
echo "nip-49 encryption/decryption test failed!"