From 601e0d97a6417c1a68fc9f7785efd672c5be581c Mon Sep 17 00:00:00 2001 From: LTLA Date: Sat, 16 Dec 2023 16:24:31 -0800 Subject: [PATCH] Added action to publish a fresh build as a release. --- .github/workflows/fresh-build.yaml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/fresh-build.yaml diff --git a/.github/workflows/fresh-build.yaml b/.github/workflows/fresh-build.yaml new file mode 100644 index 0000000..e16dbaf --- /dev/null +++ b/.github/workflows/fresh-build.yaml @@ -0,0 +1,36 @@ +on: + workflow_dispatch: + +name: Fresh build + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Restore the node modules + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: modules-${{ hashFiles('**/package.json') }} + + - name: Install packages + run: npm i --include-dev + + - name: Perform a fresh build + run: | + mkdir output + node scripts/fresh.js -o output + + - name: Publishing files + uses: softprops/action-gh-release@v1 + with: + name: Latest build + tag_name: latest + files: output/**