-
Notifications
You must be signed in to change notification settings - Fork 51
126 lines (120 loc) · 5.74 KB
/
checkbox-beta-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
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
125
126
name: Beta version of checkbox
run-name: Promote edge versions of checkbox to beta
on:
push:
branches:
- beta
workflow_dispatch:
jobs:
should-run:
runs-on: ubuntu-latest
steps:
- name: Setup the gh repository and install gh
run: |
which curl || (sudo apt update && sudo apt install curl -y)
sudo curl https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --import /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --fingerprint "2C6106201985B60E6C7AC87323F3D4EA75716059"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update -qq
sudo apt install -qq -y gh
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Verify Promotion Conditions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tools/release/can_promote_edge.py
release-notes:
needs: should-run
runs-on: ubuntu-latest
steps:
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup the gh repository and install gh
run: |
which curl || (sudo apt update && sudo apt install curl -y)
sudo curl https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --import /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --fingerprint "2C6106201985B60E6C7AC87323F3D4EA75716059"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update -qq
sudo apt install -qq -y gh
- name: Generate the github release note
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
CHECKBOX_REPO: ${{ github.repository }}
run: |
gh release create $(git describe --tags --abbrev=0 --match v*) -d --generate-notes
checkbox_deb_packages:
needs: should-run
name: Checkbox Debian packages
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y python3-launchpadlib
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
- name: Copy deb packages from edge to beta ppa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
CHECKBOX_REPO: ${{ github.repository }}
run: |
tools/release/lp_copy_packages.py checkbox-dev edge checkbox-dev beta
checkbox_core_snap:
needs: should-run
name: Checkbox core snap packages
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
steps:
- name: Setup Snapcraft
run: |
sudo snap install snapcraft --classic
- name: Promote checkbox core snaps to the beta channel
env:
SNAPCRAFT_HAS_TTY: "true" # this is necessary because snapcraft will not allow --yes for promotions of the edge channel
run: |
# Note: using `yes |` instead of `--yes` because snapcraft will
# refuse to non-interactively promote a snap from the edge
# channel if it is done without any branch qualifiers
yes | snapcraft promote checkbox16 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox18 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox20 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox22 --from-channel latest/edge --to-channel latest/beta
checkbox_snap:
needs: should-run
name: Checkbox snap packages
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
steps:
- name: Setup Snapcraft
run: |
sudo snap install snapcraft --classic
- name: Promote checkbox snaps to the beta channel
env:
SNAPCRAFT_HAS_TTY: "true" # this is necessary because snapcraft will not allow --yes for promotions of the edge channel
run: |
# Note: using `yes |` instead of `--yes` because snapcraft will
# refuse to non-interactively promote a snap from the edge
# channel if it is done without any branch qualifiers
yes | snapcraft promote checkbox --from-channel uc16/edge --to-channel uc16/beta
yes | snapcraft promote checkbox --from-channel uc18/edge --to-channel uc18/beta
yes | snapcraft promote checkbox --from-channel uc20/edge --to-channel uc20/beta
yes | snapcraft promote checkbox --from-channel uc22/edge --to-channel uc22/beta
yes | snapcraft promote checkbox --from-channel 16.04/edge --to-channel 16.04/beta
yes | snapcraft promote checkbox --from-channel 18.04/edge --to-channel 18.04/beta
yes | snapcraft promote checkbox --from-channel 20.04/edge --to-channel 20.04/beta
yes | snapcraft promote checkbox --from-channel 22.04/edge --to-channel 22.04/beta
yes | snapcraft promote checkbox --from-channel 22.04/edge --to-channel latest/beta