diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..268f2e0f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "16" + - name: Install and Build + run: | + npm install + npm run build + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - name: Rename and compress build + run: | + mv dist grampsjs-${{steps.get_version.outputs.VERSION}} + tar -czf grampsjs-${{steps.get_version.outputs.VERSION}}.tar.gz grampsjs-${{steps.get_version.outputs.VERSION}} + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: grampsjs-${{steps.get_version.outputs.VERSION}}.tar.gz