-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.07 KB
/
publish.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "Publish pipeline"
on:
workflow_dispatch:
release:
types: [published]
jobs:
homebrew-publish:
name: Publish package to Homebrew
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: sumoduduk/homebrew-tap
path: homebrew-tap
token: ${{ secrets.REPO_TOKEN }}
- name: Download artifact from build workflow
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: nix-build.yml
name: homebrew-pack-termusix
workflow_conclusion: success
- name: copy the ruby file
run: cp -f termusix.rb homebrew-tap/Formula
- name: list all directory
run : ls -R
- name: see status and push it
run: |
cd homebrew-tap
git status
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update termusix Homebrew Tap"
git push
aur-publish:
name: Publish to AUR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: sumoduduk
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Generate PKGBUILD
run: |
nix build .#termusix-pkgbuild
cat result/PKGBUILD
cp result/PKGBUILD .
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'release' }}
with:
pkgname: termusix-bin
pkgbuild: ./PKGBUILD
commit_username: sumoduduk
commit_email: sumoduduk13@gmail.com
ssh_private_key: ${{ secrets.AUR_AUTH_KEY }}
commit_message: Update AUR package
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519