-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (100 loc) · 3.19 KB
/
cli.yml
File metadata and controls
124 lines (100 loc) · 3.19 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Patchup CLI
on:
push:
paths:
- cli/**
- .github/workflows/cli.yml
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: cli
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Rust Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --locked
- name: Store Build Artifact
uses: actions/upload-artifact@master
with:
name: patchup-binary
path: cli/target/release/patchup
package:
name: Package
runs-on: ubuntu-latest
needs:
- build
defaults:
run:
working-directory: cli
outputs:
name: ${{ steps.metadata.outputs.name }}
version: ${{ steps.metadata.outputs.version }}
description: ${{ steps.metadata.outputs.description }}
license: ${{ steps.metadata.outputs.license }}
url: ${{ steps.metadata.outputs.url }}
steps:
- uses: actions/checkout@v2
- name: Load Build Artifact
uses: actions/download-artifact@master
with:
name: patchup-binary
path: cli/target/release/patchup
- name: Extract Metadata
id: metadata
run: ./package/metadata.sh
- name: Create Release Archive
run: tar -czf patchup-cli.tar.gz Cargo.lock Cargo.toml src
- name: Create Binary Release Archive
run: tar -czf patchup-cli-bin.tar.gz target/release/patchup
- name: Upload Release Archive
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cli/patchup-cli.tar.gz
tag: ${{ steps.metadata.outputs.version }}
overwrite: true
- name: Upload Binary Release Archive
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cli/patchup-cli-bin.tar.gz
tag: ${{ steps.metadata.outputs.version }}
overwrite: true
- name: Create Release PKGBUILD
run: ./package/pkgbuild.sh
- name: Create Release Binary PKGBUILD
run: ./package/pkgbuild.bin.sh
- name: Publish Release to AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.2.3
with:
pkgname: patchup
pkgbuild: ./cli/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
- name: Publish Release Binary to AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.2.3
with:
pkgname: patchup-bin
pkgbuild: ./cli/PKGBUILD-BIN
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}