fix(mandelbrot): remove time hack for web_time #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Sursface | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
initialize_release: | |
name: Initialize GitHub Release | |
runs-on: ubuntu-latest | |
outputs: | |
release_id: ${{ steps.create_release.outputs.id }} | |
tag_name: ${{ steps.generate_tag.outputs.tag }} | |
steps: | |
- name: Generate Tag Name | |
id: generate_tag | |
run: | | |
TAG_NAME="v$(date +'%Y%m%d%H%M%S')" | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | |
echo "::set-output name=tag::$TAG_NAME" | |
- name: Create Empty Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.generate_tag.outputs.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: false | |
prerelease: false | |
build: | |
name: Build Binaries | |
runs-on: ubuntu-latest | |
needs: initialize_release | |
strategy: | |
matrix: | |
target: [ | |
"x86_64-linux", | |
"x86_64-windows", | |
"wasm32-unknown" | |
] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Nix | |
uses: cachix/install-nix-action@v21 | |
with: | |
nix_path: nixpkgs=channel=nixos-24.05 | |
- name: Install Cachix | |
run: nix-env -iA cachix -f https://cachix.org/api/v1/install | |
- name: Use Cachix | |
run: cachix use thinnerthinker | |
- name: Build Package | |
run: | | |
nix build .#${{ matrix.target }} | |
mkdir -p output | |
zip -r output/sursface-${{ matrix.target }}.zip result/* | |
- name: Upload to Release | |
uses: AButler/[email protected] | |
with: | |
files: "output/sursface-${{ matrix.target }}.zip" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
release-id: ${{ needs.initialize_release.outputs.release_id }} | |
- name: Authenticate with Cachix | |
run: cachix authtoken ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Push to Cachix | |
run: nix path-info --all | cachix push thinnerthinker |