diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b04d076..38513a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,5 @@ name: Release on: - workflow_run: - workflows: - - Build - branches: - - master - types: - - completed push: tags: - "v*.*.*" @@ -35,7 +28,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 +41,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.web.src)" \ + >> "$GITHUB_OUTPUT" + id: web_src + # cf https://github.com/actions/upload-pages-artifact/blob/main/action.yml + - uses: actions/upload-pages-artifact@v3 + 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 +91,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 +153,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 @@ -173,7 +179,6 @@ jobs: mv super_rogue_x64.zip super_rogue_windows_x64.zip - name: Release uses: softprops/action-gh-release@v2 - # if: startsWith(github.ref, 'refs/tags/') with: files: | super_rogue.love diff --git a/README.md b/README.md index c5ac44e..c262f9b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Super Rogue +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) + *(Not [that][original-super-rogue] super rogue!)* Inspired by [SUPERHOT][superhot]. @@ -11,11 +13,15 @@ Inspired by [SUPERHOT][superhot]. ### Online -This project's default branch deploys to -[super-rogue.workinprogress.top](https://super-rogue.workinprogress.top/). +Each release is automatically published to [bismuthsoft.github.io/super_rogue][web]. + +[web]: https://bismuthsoft.github.io/super_rogue/ + +### Pre-built for Linux, Windows + +See our [releases page](https://github.com/bismuthsoft/super_rogue/releases) for downloads targeting Windows, Linux, and more! -Each commit is deployed to its own public URL. See comments in PRs or GitHub -Actions transcripts for URLs. +*(Mac users, please consider downloading the `.love` file or playing [the web version][web].)* ### Run natively from source @@ -26,13 +32,14 @@ Install [LÖVE (love2d)][love2d]. Then run: love src ``` -Or if you have nix: +Or if you have nix (non-NixOS users need [nixGL][nixGL]): ```bash nix run .#super_rogue.desktop ``` [love2d]: https://love2d.org/ +[nixGL]: https://github.com/nix-community/nixGL ### Run in-browser from source @@ -55,7 +62,7 @@ We use a standard GitHub Pull Request workflow. ### Running tests ```bash -run run .#super_rogue.test +nix run .#super_rogue.test ```