-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.37 KB
/
release.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
name: release
on:
release:
types: [created]
jobs:
lint:
uses: ./.github/workflows/lint.yml
build-ok:
uses: ./.github/workflows/build.yml
build-asset-release:
runs-on: ubuntu-latest
needs: build-ok
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: nowsprinting/[email protected]
id: version
with:
prefix: "v"
- name: Replace tag
run: |
TAG=${{ steps.version.outputs.full_without_prefix }}
echo "Replacing tag with $TAG"
sed -i "s/^\(version\s*=\s*\"\).*\(\".*\)$/\1$TAG\2/" "Cargo.toml"
sed -i "s/^\(VERSION\s*=\s*\"\).*\(\".*\)$/\1$TAG\2/" "debian-build.sh"
sed -i "s/^\(Version\s*:\s*\).*\(.*\)$/\1$TAG\2/" "debian/DEBIAN/control"
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev xorg-dev libxdo-dev
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Create debian package
run: ./debian-build.sh
- name: Commit & Push changes
uses: actions-js/push@[email protected]
with:
message: "🔖 auto update version 🤖"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Release Asset
uses: softprops/action-gh-release@v1
with:
files: capslock*.deb