forked from desktop-plus/desktop-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (99 loc) · 3.55 KB
/
Copy pathrelease-linux.yml
File metadata and controls
128 lines (99 loc) · 3.55 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
125
126
127
128
name: ENSTA Linux Release
on:
push:
tags:
- 'v*-ensta.*'
permissions:
contents: write
concurrency:
group: ensta-linux-release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Build and publish Linux release
runs-on: ubuntu-latest
timeout-minutes: 60
env:
NODE_VERSION: 24.19.0
RELEASE_CHANNEL: production
npm_config_arch: x64
TARGET_ARCH: x64
steps:
- name: Check out tagged source
uses: actions/checkout@v7
with:
submodules: recursive
- name: Validate release tag
id: version
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
if [[ ! "${TAG}" =~ ^v([0-9]+\.){2,3}[0-9]+-ensta\.[0-9]+$ ]]; then
echo "Unsupported ENSTA release tag: ${TAG}" >&2
exit 1
fi
VERSION="${TAG#v}"
PUBLIC_VERSION="${VERSION%-ensta.*}"
ENSTA_REVISION="${VERSION##*-ensta.}"
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
echo "public_version=${PUBLIC_VERSION}" >> "${GITHUB_OUTPUT}"
echo "ensta_revision=${ENSTA_REVISION}" >> "${GITHUB_OUTPUT}"
echo "Release version: ${VERSION}"
echo "Public version: ${PUBLIC_VERSION}"
echo "ENSTA revision: ${ENSTA_REVISION}"
- name: Set up build environment
uses: ./.github/actions/setup-ci-environment
with:
node-version: ${{ env.NODE_VERSION }}
arch: x64
- name: Install Linux packaging tools
shell: bash
run: |
sudo apt-get update -q
sudo apt-get install -y fakeroot zstd
- name: Build production application
run: yarn build:prod
- name: Package ENSTA Linux release
run: yarn package:linux-release
- name: Verify release artifacts
shell: bash
run: |
set -euo pipefail
PUBLIC_VERSION="${{ steps.version.outputs.public_version }}"
DEB="dist/github-desktop-linux_${PUBLIC_VERSION}_amd64.deb"
APPIMAGE="dist/github-desktop-linux-${PUBLIC_VERSION}-x86_64.AppImage"
test -f "${DEB}"
test -f "${APPIMAGE}"
test -f dist/SHA256SUMS
chmod +x "${APPIMAGE}"
(
cd dist
sha256sum --check SHA256SUMS
)
test "$(dpkg-deb -f "${DEB}" Version)" = "${APP_VERSION}"
test "$(dpkg-deb -f "${DEB}" Homepage)" = "https://github.com/ENSTARobotics/github-desktop-linux"
echo "Verified release artifacts:"
ls -lh "${DEB}" "${APPIMAGE}" dist/SHA256SUMS
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
name:
GitHub Desktop for Linux ${{ steps.version.outputs.public_version }}
body: |
Based on Desktop Plus ${{ steps.version.outputs.public_version }}.
ENSTA Robotics release revision: ${{ steps.version.outputs.ensta_revision }}.
## Supported platform
- Linux x86_64
- Ubuntu 22.04 LTS and 24.04 LTS
- Debian-based distributions
This release was built automatically from the tagged source.
This is a community-maintained build and is not affiliated with or endorsed by GitHub.
files: |
dist/github-desktop-linux_*.deb
dist/github-desktop-linux-*.AppImage
dist/SHA256SUMS
draft: false
prerelease: false
fail_on_unmatched_files: true
overwrite_files: true