-
Notifications
You must be signed in to change notification settings - Fork 3
90 lines (86 loc) · 2.69 KB
/
python-pkg.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Python packages
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.repository }}-python
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package:
- python-atoml
- python-tinyaes
- python-pytest-drop-dup-tests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Build
id: build
uses: samarthj/arch-pkgbuild-action@main
with:
pkgbuild_root: ${{ matrix.package }}
aur_username: Sam
aur_email: dev@samarthj.com
aur_ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
is_python_pkg: true
use_pypi_release_version: true
dry_run: false
env:
GOPATH: /home/builder/.local/share/go
GOCACHE: /home/builder/.cache/go
- name: Delete tag ${{ matrix.package }}
uses: cb80/delrel@latest
with:
tag: ${{ matrix.package }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Release tag ${{ matrix.package }}
uses: ncipollo/release-action@v1
with:
tag: ${{ matrix.package }}
name: ${{ steps.build.outputs.ver0 }}
body: ${{ steps.build.outputs.ver0 }}
allowUpdates: true
replacesArtifacts: true
artifacts: '*.tar.zst'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Import GPG key
id: gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Setup git config
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "Sam"
git config --global user.email dev@samarthj.com
git config --global user.signkey dev@samarthj.com
git config --global commit.gpgsign true
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Rebase and Push
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add .
git status
[ -z "$(git diff FETCH_HEAD --stat)" ] && exit 0
git commit --message "ci(github-actions): :package: updpkg: ${{ steps.build.outputs.ver0 }}"
git fetch origin main
git pull --rebase origin main
git push