Skip to content

Commit 21a263b

Browse files
authored
Merge pull request #1367 from Bilb/fix-appimage-latest-yml
only appImage can auto update through auto updater
2 parents 7dad8e1 + 5a6068f commit 21a263b

File tree

4 files changed

+74
-4
lines changed

4 files changed

+74
-4
lines changed

.github/workflows/build-binaries.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,77 @@ jobs:
7777
run: |
7878
sed -i 's/"target": "deb"/"target": "${{ matrix.pkg_to_build }}"/g' package.json && yarn build-release-publish
7979
80+
- name: Backup AppImage latest-linux.yml file
81+
# only run this on "push" to "master"
82+
# Note: only AppImage can auto update via electron-builder on linux.continue-on-error.
83+
# Note: We need to backup the latest-linux appImage file as other builds are overwriting it when they finish
84+
# after the AppImage build
85+
if: ${{ env.SHOULD_PUBLISH == 'true' && matrix.pkg_to_build == 'AppImage' }}
86+
shell: bash
87+
run: |
88+
mv dist/latest-linux.yml dist/latest-linux-${{ matrix.pkg_to_build }}.yml
89+
90+
- name: Upload release metadata
91+
# only run this on "push" to "master"
92+
# Check the details of why we need this above (and why only for AppImage)
93+
if: ${{ env.SHOULD_PUBLISH == 'true' && matrix.pkg_to_build == 'AppImage' }}
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: latest-linux-${{ matrix.pkg_to_build }}.yml
97+
path: dist/latest-linux-${{ matrix.pkg_to_build }}.yml
98+
99+
post_build_linux:
100+
needs: [build_linux]
101+
runs-on: ubuntu-22.04
102+
env:
103+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
steps:
105+
- name: Checkout git repo
106+
# only run this on "push" to "master"
107+
if: ${{ env.SHOULD_PUBLISH == 'true' }}
108+
uses: actions/checkout@v4
109+
# We only need the package.json file in this run (to extract the version being built)
110+
with:
111+
sparse-checkout: |
112+
package.json
113+
sparse-checkout-cone-mode: false
114+
115+
- name: Get version tag from package.json
116+
id: get_version
117+
# only run this on "push" to "master"
118+
if: ${{ env.SHOULD_PUBLISH == 'true' }}
119+
run: |
120+
version=$(node -p "require('./package.json').version")
121+
echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
122+
123+
- name: Download release metadata
124+
# only run this on "push" to "master"
125+
if: ${{ env.SHOULD_PUBLISH == 'true' }}
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: latest-linux-AppImage.yml
129+
path: dist
130+
131+
- name: Rename
132+
# only run this on "push" to "master"
133+
if: ${{ env.SHOULD_PUBLISH == 'true' }}
134+
run: |
135+
mv dist/latest-linux-AppImage.yml dist/latest-linux.yml
136+
137+
- name: Upload changes to draft release
138+
# only run this on "push" to "master"
139+
if: ${{ env.SHOULD_PUBLISH == 'true' }}
140+
uses: ncipollo/release-action@v1
141+
with:
142+
tag: v${{ steps.get_version.outputs.VERSION_TAG }}
143+
draft: true
144+
name: 'Draft'
145+
artifacts: 'dist/latest-linux.yml'
146+
allowUpdates: true
147+
omitNameDuringUpdate: true
148+
replacesArtifacts: true
149+
updateOnlyUnreleased: true
150+
80151
build_windows:
81152
runs-on: windows-2022
82153
env:

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ release/**
2929
coverage/
3030
stylesheets/dist/**
3131

32-
ts/localization/locales.ts
33-
3432
# _locales files are generated by crowdin now.
33+
ts/localization/locales.ts
34+
ts/localization/constants.ts
3535
_locales/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "session-desktop",
33
"productName": "Session",
44
"description": "Private messaging from your desktop",
5-
"version": "1.15.1",
5+
"version": "1.15.2",
66
"license": "GPL-3.0",
77
"author": {
88
"name": "Session Foundation",

ts/localization/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,3 @@ export type CrowdinLocale = (typeof crowdinLocales)[number];
9696
export function isCrowdinLocale(locale: string): locale is CrowdinLocale {
9797
return crowdinLocales.includes(locale as CrowdinLocale);
9898
}
99-

0 commit comments

Comments
 (0)