Skip to content

Commit

Permalink
Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Clonkk committed Oct 7, 2024
1 parent 5cde455 commit 1029eee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ on:
pull_request:
branches:
- main

push:
branches:
- devel
- main

name: CI - Test

jobs:
build:
environment:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
on:
release:
types: [published]
branches: [main]

permissions:
contents: write

Expand Down Expand Up @@ -26,18 +31,22 @@ jobs:
run: nimble build

- name: Package
run: zip ngron-${{ matrix.os }}.zip zip
run: zip ngron-${{ matrix.os }}.zip ngron

- name: Upload an Asset in GitHub Release
uses: "actions/github-script@v6"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
const fs = require('fs').promises;
await github.rest.repos.uploadReleaseAsset({
name: 'ngron',
name: 'ngron-${{ matrix.os }}',
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ env.RELEASE_ID }},
data: await fs.readFile('ngron-${{ matrix.os }}.zip') # The file to upload.
release_id: ${{ github.event.release.id }},
data: await fs.readFile('ngron-${{ matrix.os }}.zip'),
});

0 comments on commit 1029eee

Please sign in to comment.