Skip to content

Commit

Permalink
Add build and release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
depau committed Oct 7, 2024
1 parent 3370bd9 commit 6a950df
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and release
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js

uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

- name: Build executables
run: npm run pkg

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: dist

- name: Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
with:
files: dist/*
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6a950df

Please sign in to comment.