Skip to content

Commit

Permalink
update github action to include release publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Nov 7, 2024
1 parent ac895bc commit f74f8bf
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build anura
name: CI

on: [push]
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build Anura
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
Expand All @@ -23,3 +27,34 @@ jobs:
name: Anura static build
path: anura.zip
retention-days: 2

upload:
name: Upload release
runs-on: ubuntu-latest
needs: build
permissions: write-all
if: github.ref == 'refs/heads/main'

steps:
- name: Delete old release and tag
uses: dev-drprasad/delete-tag-and-release@v1.0.1
with:
delete_release: true
tag_name: latest
github_token: ${{ github.token }}

- name: Get artifacts
uses: actions/download-artifact@v4
with:
name: Anura Static Build
path: .

- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
name: Continuous Build
tag: latest
commit: main
body: "${{ github.event.head_commit.url }} ${{ github.event.head_commit.message }}"
artifacts: "anura.zip"
prerelease: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"filer": "^1.4.1",
"fs-readdir-recursive": "^1.1.0",
"idb-keyval": "^6.2.1",
"libcurl.js": "^0.6.17",
"libcurl.js": "^0.6.19",
"mime": "^4.0.4",
"onchange": "^7.1.0",
"postcss": "^8.4.45",
Expand Down

0 comments on commit f74f8bf

Please sign in to comment.