Update actions/checkout digest to b4ffde6 #96
Workflow file for this run
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: "ci" | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU binfmt for cross compiling | |
uses: docker/setup-qemu-action@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v6 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux x86_64-linux | |
- name: Cache Nix store | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Check flake | |
run: nix flake check --accept-flake-config | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
strategy: | |
matrix: | |
system: | |
- "aarch64-linux" | |
- "x86_64-linux" | |
package: | |
- "server" | |
- "client" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU binfmt for building aarch64 | |
uses: docker/setup-qemu-action@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v6 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux x86_64-linux | |
- name: Cache Nix store | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Build package | |
run: nix build --accept-flake-config .#packages.${{ matrix.system }}.${{ matrix.package }} | |
bundle: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
strategy: | |
matrix: | |
system: | |
- "aarch64-linux" | |
- "x86_64-linux" | |
bundler: | |
- name: "deb" | |
path: "github:viperML/bundlers#deb" | |
extension: "deb" | |
- name: "pacman" | |
path: "github:viperML/bundlers#pacman" | |
extension: "tar.xz" | |
- name: "rpm" | |
path: "github:viperML/bundlers#rpm" | |
extension: "rpm" | |
- name: "docker" | |
path: "github:viperML/bundlers#docker" | |
extension: "tar.gz" | |
- name: "appimage" | |
path: "github:ralismark/nix-appimage" | |
extension: "AppImage" | |
package: | |
- "server" | |
- "client" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU binfmt for cross compiling | |
uses: docker/setup-qemu-action@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v6 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux x86_64-linux | |
- name: Set up binary cache | |
uses: cachix/cachix-action@v12 | |
with: | |
name: nix-rust-template | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build ${{ matrix.bundler.name }} package for ${{ matrix.system }} | |
run: >- | |
nix bundle | |
--bundler ${{ matrix.bundler.path }} | |
--accept-flake-config | |
--out-link "bundles/${{ github.event.repository.name }}-${{ matrix.system }}.${{ matrix.bundler.extension }}" | |
.#packages.${{ matrix.system }}.${{ matrix.package }} | |
- name: Upload bundles | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.package }}-${{ matrix.bundler.name }}-${{ matrix.system }} | |
path: bundles/* | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- bundle | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "artifacts/**" | |
commit: ${{ github.sha }} | |
name: ${{ github.ref_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} |