1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 12:37:45 +00:00

feat: release workflow

This commit is contained in:
Kevin Amado 2022-02-07 23:22:53 -05:00
parent 874c3e7e51
commit ed40bba5e6
No known key found for this signature in database
GPG key ID: FFF341057F503148
2 changed files with 64 additions and 13 deletions

View file

@ -15,6 +15,10 @@ jobs:
- name: Clone
uses: actions/checkout@v2
- uses: cachix/cachix-action@v10
with:
name: alejandra
- name: Build
uses: docker://nixos/nix
with:
@ -26,20 +30,33 @@ jobs:
build
--print-build-logs
- name: Test
- name: Check
uses: docker://nixos/nix
with:
args: >
bash -ec "
source <( \
nix \
--extra-experimental-features flakes \
--extra-experimental-features nix-command \
--extra-substituters http://172.17.0.1:5000?trusted=1 \
print-dev-env \
--no-update-lock-file \
--no-write-lock-file \
)
nix
--extra-experimental-features flakes
--extra-experimental-features nix-command
--extra-substituters http://172.17.0.1:5000?trusted=1
flake
check
--print-build-logs
cargo tarpaulin
"
# ERROR cargo_tarpaulin: Failed to run tests: ASLR disable failed: EPERM: Operation not permitted
# - name: Test
# uses: docker://nixos/nix
# with:
# args: >
# bash -ec "
# source <( \
# nix \
# --extra-experimental-features flakes \
# --extra-experimental-features nix-command \
# --extra-substituters http://172.17.0.1:5000?trusted=1 \
# print-dev-env \
# --no-update-lock-file \
# --no-write-lock-file \
# )
# cargo tarpaulin
# "

34
.github/workflows/release.yaml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Release
on:
push:
branches: [ main ]
concurrency:
cancel-in-progress: true
group: ${{ github.actor }}
jobs:
release:
name: Release
runs-on: self-hosted
steps:
- name: Clone
uses: actions/checkout@v2
- uses: cachix/cachix-action@v10
with:
name: alejandra
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
uses: docker://nixos/nix
with:
args: >
nix
--extra-experimental-features flakes
--extra-experimental-features nix-command
--extra-substituters http://172.17.0.1:5000?trusted=1
build
--print-build-logs
- name: Push
run: |
cachix push result