diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b04d076..9e9fd79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,12 @@ name: Release on: - workflow_run: - workflows: - - Build - branches: - - master - types: - - completed + # workflow_run: + # workflows: + # - Build + # branches: + # - master + # types: + # - completed push: tags: - "v*.*.*" @@ -35,7 +35,7 @@ jobs: name: dot_love-${{ github.sha }} path: ${{ steps.dot_love.outputs.DOT_LOVE }} if-no-files-found: error - website: + webroot: needs: - dot_love # Use pre-built game.love via cachix runs-on: ubuntu-latest @@ -48,18 +48,31 @@ jobs: with: name: bismuthsoft authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix build + - run: nix build .#super_rogue.web.src - run: | - env | grep -o "^AWS_[^=]*" - echo $AWS_ACCESS_KEY_ID | wc -c - echo $AWS_SECRET_ACCESS_KEY | wc -c - src=$(nix eval --raw ".#super_rogue.web.src")/ - dest=s3://winny-super-rogue/ - nix run .#ci.s5cmd -- sync --acl public-read "$src" "$dest" - echo https://super-rogue.workinprogress.top/ - env: - AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }} + printf 'WEB_SRC=%s\n' \ + "$(nix eval --raw .#super_rogue.dot_love)/super_rogue.web.src \ + >> "$GITHUB_OUTPUT" + id: web_src + # cf https://github.com/actions/upload-pages-artifact/blob/main/action.yml + - uses: actions/upload-pages-artifact@v4 + with: + path: ${{ steps.web_src.outputs.WEB_SRC }} + website: + # cf https://github.com/actions/deploy-pages?tab=readme-ov-file#usage + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: + - webroot + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 linux: needs: - dot_love @@ -85,7 +98,7 @@ jobs: build-deb: true product-name: super-rogue output-folder: ./dist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: dist-linux path: dist @@ -147,7 +160,7 @@ jobs: product-website: https://super-rogue.workinprogress.top installer-languages: English.isl output-folder: "./dist" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: dist-windows path: dist @@ -175,6 +188,7 @@ jobs: uses: softprops/action-gh-release@v2 # if: startsWith(github.ref, 'refs/tags/') with: + draft: true files: | super_rogue.love