Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kc1awv committed Nov 29, 2024
1 parent 105ed0f commit 91c01ff
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,59 +71,64 @@ jobs:

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/github-script@v6
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: release } = await github.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: context.ref,
name: `Release ${context.ref}`,
draft: false,
prerelease: false,
});
fs.writeFileSync(process.env.GITHUB_ENV, `UPLOAD_URL=${release.upload_url}\n`);
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/go-m17-relay-linux-amd64
asset_name: go-m17-relay-linux-amd64
asset_content_type: application/octet-stream

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/go-m17-relay-linux-arm
asset_name: go-m17-relay-linux-arm
asset_content_type: application/octet-stream

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/go-m17-relay-linux-arm64
asset_name: go-m17-relay-linux-arm64
asset_content_type: application/octet-stream

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/go-m17-relay-windows-amd64
asset_name: go-m17-relay-windows-amd64
asset_content_type: application/octet-stream

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/go-m17-relay-darwin-amd64
asset_name: go-m17-relay-darwin-amd64
asset_content_type: application/octet-stream

- name: Upload config.dist
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: config.dist
asset_name: config.dist
asset_content_type: text/plain

0 comments on commit 91c01ff

Please sign in to comment.