diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 54% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index d306a8c..9c62595 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test the build +name: Test, build and release on: push: @@ -29,3 +29,18 @@ jobs: - name: Build the project run: bun run build + + - name: Archive dist folder + if: github.ref == 'refs/heads/main' + run: | + tar -czf site.tar.gz -C dist . + zip -r site.zip dist + + - name: Release + if: github.ref == 'refs/heads/main' + uses: softprops/action-gh-release@v2 + with: + tag_name: "${{ github.run_id }}" + files: | + site.tar.gz + site.zip \ No newline at end of file