ха
This commit is contained in:
parent
5c53f55be6
commit
fc5e30dda3
@ -33,13 +33,24 @@ jobs:
|
|||||||
tar -czvf gogofetch-${{ github.ref_name }}-linux-amd64.tar.gz gogofetch Makefile logos/
|
tar -czvf gogofetch-${{ github.ref_name }}-linux-amd64.tar.gz gogofetch Makefile logos/
|
||||||
|
|
||||||
- name: Create Release and Upload Asset
|
- name: Create Release and Upload Asset
|
||||||
env:
|
uses: actions/github-script@v7
|
||||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
GITEA_URL: ${{ github.server_url }}
|
script: |
|
||||||
run: |
|
const fs = require('fs');
|
||||||
gitea release create \
|
const assetName = `gogofetch-${context.ref.replace('refs/tags/', '')}-linux-amd64.tar.gz`;
|
||||||
--repo "${{ github.repository }}" \
|
|
||||||
--tag "${{ github.ref_name }}" \
|
const release = await github.rest.repos.createRelease({
|
||||||
--title "Release ${{ github.ref_name }}" \
|
owner: context.repo.owner,
|
||||||
--note "Automated binary release for Arch Linux AUR" \
|
repo: context.repo.repo,
|
||||||
--asset "gogofetch-${{ github.ref_name }}-linux-amd64.tar.gz"
|
tag_name: context.ref.replace('refs/tags/', ''),
|
||||||
|
name: `Release ${context.ref.replace('refs/tags/', '')}`,
|
||||||
|
body: "Automated binary release for Arch Linux AUR"
|
||||||
|
});
|
||||||
|
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
release_id: release.data.id,
|
||||||
|
name: assetName,
|
||||||
|
data: fs.readFileSync(`./${assetName}`)
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue
Block a user