Skip to content

Commit

Permalink
chore: Add GitHub workflow to publish release
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannibaratta committed Nov 1, 2023
1 parent f21e7ea commit 03344f8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/build-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Publish Artifact

# on:
# push:
# branches:
# - main

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Yarn install
uses: borales/actions-yarn@v4
with:
cmd: install
dir: core

- name: Compile application
uses: borales/actions-yarn@v4
with:
cmd: compile
dir: core

- name: Build artifact
uses: borales/actions-yarn@v4
with:
cmd: generate:artifact
dir: core

- name: Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/terraapprove
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"compile": "nest build",
"test": "yarn jest {libs/**/*.test.ts,main/**/*.test.ts}",
"prepush-validation": "yarn lint && yarn compile && yarn test",
"generate:artifact": "(rm ../artifacts/terraapprove || true) && yarn pkg --targets node18-linux --output ../artifacts/terraapprove --compress GZip ./build/main/src/main.js"
"generate:artifact": "(rm ../artifacts/terraapprove 2>/dev/null || true) && yarn pkg --targets node18-linux --output ../artifacts/terraapprove --compress GZip ./build/main/src/main.js"
},
"name": "terraapprove",
"version": "0.0.1",
Expand Down

0 comments on commit 03344f8

Please sign in to comment.