-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (57 loc) · 1.76 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
on:
pull_request:
push:
branches:
- main
- beta
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: de-vri-es/setup-git-credentials@v2
with:
credentials: ${{ secrets.GH_PULL_CREDENTIALS }}
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v6
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: jacobtomlinson/gha-find-replace@v3
with:
find: "git@github.com:"
replace: "https://github.com/"
regex: false
include: "**/*.dvc"
- uses: iterative/setup-dvc@v1
with:
version: "2.58.2"
- run: dvc pull --force
- run: nix develop -c poetry run pytest
release:
runs-on: ubuntu-latest
needs: test
if: ${{ github.repository_owner == 'recap-utr' && github.event_name == 'push' }}
permissions:
id-token: write
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: DeterminateSystems/nix-installer-action@v6
with:
extra-conf: |
extra-platforms = aarch64-linux
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix profile install .#releaseEnv
- uses: cihelper/action-semanticrelease-poetry@v1
id: semanticrelease
- uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.semanticrelease.outputs.released == 'true' }}
- run: nix run .#dockerManifest --impure
if: ${{ steps.semanticrelease.outputs.released == 'true' }}
env:
VERSION: ${{ steps.semanticrelease.outputs.version }}
GH_TOKEN: ${{ github.token }}