diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d57987..e16a890 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,10 @@ +--- name: Release CI -on: [push] +on: + branches: main + tags: + - '*' jobs: build: @@ -17,8 +21,27 @@ jobs: npm install npm run build popd - - name: Archive artifacts - uses: actions/upload-artifact@v4 + - name: Tar dist + run: tar czf its-a-unix-system.tar.gz dist/ + - name: Create Release + if: startsWith(github.ref, 'refs/tags/') + uses: actions/create-release@v1 + id: create_release with: - name: iaus-release - path: www/dist + draft: true + prerelease: true + release_name: ${{ github.ref }} + tag_name: ${{ github.ref }} + body: Look at me I'm a release haha + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Release + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./its-a-unix-system.tar.gz + asset_name: its-a-unix-system.tar.gz + asset_content_type: application/gzip