mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 04:57:44 +00:00
feat: release workflow
This commit is contained in:
parent
874c3e7e51
commit
ed40bba5e6
2 changed files with 64 additions and 13 deletions
43
.github/workflows/pr.yaml
vendored
43
.github/workflows/pr.yaml
vendored
|
@ -15,6 +15,10 @@ jobs:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: cachix/cachix-action@v10
|
||||||
|
with:
|
||||||
|
name: alejandra
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker://nixos/nix
|
uses: docker://nixos/nix
|
||||||
with:
|
with:
|
||||||
|
@ -26,20 +30,33 @@ jobs:
|
||||||
build
|
build
|
||||||
--print-build-logs
|
--print-build-logs
|
||||||
|
|
||||||
- name: Test
|
- name: Check
|
||||||
uses: docker://nixos/nix
|
uses: docker://nixos/nix
|
||||||
with:
|
with:
|
||||||
args: >
|
args: >
|
||||||
bash -ec "
|
nix
|
||||||
source <( \
|
--extra-experimental-features flakes
|
||||||
nix \
|
--extra-experimental-features nix-command
|
||||||
--extra-experimental-features flakes \
|
--extra-substituters http://172.17.0.1:5000?trusted=1
|
||||||
--extra-experimental-features nix-command \
|
flake
|
||||||
--extra-substituters http://172.17.0.1:5000?trusted=1 \
|
check
|
||||||
print-dev-env \
|
--print-build-logs
|
||||||
--no-update-lock-file \
|
|
||||||
--no-write-lock-file \
|
|
||||||
)
|
|
||||||
|
|
||||||
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
34
.github/workflows/release.yaml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue