-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.05 KB
/
release-crates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish to Crates.io
on:
push:
tags:
- 'yakite@*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Verify Nix Installation
run: nix shell nixpkgs#nix-info -c nix-info -m
- name: Install Direnv With Nix
uses: aldoborrero/direnv-nix-action@v2
with:
use_nix_profile: true
nix_channel: nixpkgs
- name: Load PATH Changes
run: direnv exec . sh -c 'echo $PATH' > "$GITHUB_PATH"
- name: Load other environment changes
run: direnv export gha >> "$GITHUB_ENV"
- name: Build
run: cd $DEVENV_ROOT/apps/yakite; cargo build --release
- name: Publish To Crates.io
run: cd $DEVENV_ROOT/apps/yakite; cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}