Skip to content

Commit 3c493f1

Browse files
committed
👷 Add deploy-nur CD
1 parent 9e720d2 commit 3c493f1

File tree

3 files changed

+52
-11
lines changed

3 files changed

+52
-11
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,25 @@ jobs:
8484
files: |
8585
dist/*
8686
87-
# deploy:
88-
# needs: build
89-
# runs-on: ubuntu-latest
90-
# if: startsWith(github.ref, 'refs/tags/')
91-
# steps:
92-
# - uses: Freed-Wu/[email protected]
93-
# with:
94-
# package_name: python-repl-python-wakatime
95-
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
87+
# deploy-aur:
88+
# needs: build
89+
# runs-on: ubuntu-latest
90+
# if: startsWith(github.ref, 'refs/tags/')
91+
# steps:
92+
# - uses: Freed-Wu/[email protected]
93+
# with:
94+
# package_name: python-repl-python-wakatime
95+
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
96+
97+
# yamllint disable rule:line-length
98+
# deploy-nur:
99+
# needs: build
100+
# runs-on: ubuntu-latest
101+
# if: startsWith(github.ref, 'refs/tags/')
102+
# steps:
103+
# - name: Trigger Workflow
104+
# run: >
105+
# curl -X POST -d '{"ref":"main"}'
106+
# -H "Accept: application/vnd.github.v3+json"
107+
# -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}"
108+
# https://api.github.com/repos/Freed-Wu/nur-packages/actions/workflows/version.yml/dispatches

.github/workflows/nix.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
"on":
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
pull_request:
7+
paths-ignore:
8+
- "**.md"
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
nixpkgs:
16+
- nixos-unstable
17+
- nixpkgs-unstable
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: cachix/install-nix-action@v22
22+
with:
23+
nix_path: nixpkgs=channel:${{matrix.nixpkgs}}
24+
extra_nix_config: |
25+
experimental-features = nix-command flakes
26+
access-tokens = github.com=${{secrets.GITHUB_TOKEN}}
27+
- name: Build
28+
run: |
29+
nix build

flake.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
{
1010
formatter = nixpkgs-fmt;
1111
packages.default = buildPythonApplication rec {
12-
pname = "repl-python-wakatime";
13-
version = "";
12+
name = "repl-python-wakatime";
1413
src = self;
1514
format = "pyproject";
1615
disabled = pythonOlder "3.6";

0 commit comments

Comments
 (0)