diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 097f029..f9cd6b1 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,5 +1,10 @@ name: Build and Attach Artifacts to Release -on: push +on: + push: + branches: + - main + paths-ignore: + - '**/README.md' jobs: build: runs-on: ubuntu-latest @@ -8,22 +13,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Use Node.js 18.x uses: actions/setup-node@v4 with: node-version: 18.x + - name: Install dependencies run: npm install + - name: Build run: npm run build + - name: Archive production artifacts uses: actions/upload-artifact@v4 with: name: dist path: dist + - name: Archive production artifacts run: tar -czvf dist.tar.gz dist if: startsWith(github.ref, 'refs/tags/') + - name: Upload Release Asset id: upload-release-asset uses: softprops/action-gh-release@v1