aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-08-10 16:08:23 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-10 19:38:23 +0530
commit2beb2e4560f7ae406354d777b43201d040c44af0 (patch)
tree83fdd139f28a7150c430e191aa49a6ac17d7ef39 /.github
parentrefactor: Removed duplication and added note about why they were slightly dif... (diff)
downloadferdium-app-2beb2e4560f7ae406354d777b43201d040c44af0.tar.gz
ferdium-app-2beb2e4560f7ae406354d777b43201d040c44af0.tar.zst
ferdium-app-2beb2e4560f7ae406354d777b43201d040c44af0.zip
build: add Ferdi snap package (#1767)
- add snap as build target for linux - update GH actions to auto-publish snap (based on branch and package.json version)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ferdi-builds.yml31
1 files changed, 27 insertions, 4 deletions
diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml
index 46ae40fc0..d9627c816 100644
--- a/.github/workflows/ferdi-builds.yml
+++ b/.github/workflows/ferdi-builds.yml
@@ -190,6 +190,7 @@ jobs:
190 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV 190 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV
191 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV 191 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV
192 echo "SKIP_NOTARIZATION=${{ !contains(github.repository_owner, 'getferdi') }}" >> $GITHUB_ENV 192 echo "SKIP_NOTARIZATION=${{ !contains(github.repository_owner, 'getferdi') }}" >> $GITHUB_ENV
193 echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
193 - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch 194 - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch
194 uses: actions/checkout@v2 195 uses: actions/checkout@v2
195 if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} 196 if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }}
@@ -252,18 +253,40 @@ jobs:
252 shell: bash 253 shell: bash
253 - name: Build Ferdi with publish for 'nightly' branch 254 - name: Build Ferdi with publish for 'nightly' branch
254 if: ${{ env.GIT_BRANCH_NAME == 'nightly' }} 255 if: ${{ env.GIT_BRANCH_NAME == 'nightly' }}
255 run: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=nightlies
256 shell: bash
257 env: 256 env:
258 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }} 257 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }}
259 CSC_IDENTITY_AUTO_DISCOVERY: false 258 CSC_IDENTITY_AUTO_DISCOVERY: false
259 SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
260 run: |
261 sudo snap install snapcraft --classic
262 echo "$SNAPCRAFT_LOGIN" | snapcraft login --with -
263 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=nightlies
264 snapcraft logout
265 shell: bash
260 - name: Build Ferdi with publish for 'release' branch 266 - name: Build Ferdi with publish for 'release' branch
261 if: ${{ env.GIT_BRANCH_NAME == 'release' }} 267 if: ${{ env.GIT_BRANCH_NAME == 'release' && contains(env.PACKAGE_VERSION, 'beta') }}
262 run: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=ferdi 268 env:
269 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }}
270 CSC_IDENTITY_AUTO_DISCOVERY: false
271 SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
272 run: |
273 sudo snap install snapcraft --classic
274 echo "$SNAPCRAFT_LOGIN" | snapcraft login --with -
275 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=ferdi -c.snap.publish.channels=beta
276 snapcraft logout
263 shell: bash 277 shell: bash
278 - name: Build Ferdi with publish for 'release' branch
279 if: ${{ env.GIT_BRANCH_NAME == 'release' && !contains(env.PACKAGE_VERSION, 'beta') }}
264 env: 280 env:
265 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }} 281 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }}
266 CSC_IDENTITY_AUTO_DISCOVERY: false 282 CSC_IDENTITY_AUTO_DISCOVERY: false
283 SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
284 run: |
285 sudo snap install snapcraft --classic
286 echo "$SNAPCRAFT_LOGIN" | snapcraft login --with -
287 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=ferdi -c.snap.publish.channels=stable
288 snapcraft logout
289 shell: bash
267 290
268 build_windows: 291 build_windows:
269 name: 'windows ${{ github.event.inputs.message }}' 292 name: 'windows ${{ github.event.inputs.message }}'