Build ONLYOFFICE_DesktopEditors-99.99.99-4130 #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish SNAP package | |
run-name: Build ONLYOFFICE_DesktopEditors-${{ github.event.inputs.version }}-${{ github.event.inputs.build }} | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: 'Version' | |
required: true | |
build: | |
description: 'Build number' | |
type: string | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Replace Version and Build Number | |
id: repl | |
run: | | |
VERSION=${{ github.event.inputs.version }} | |
BUILD_NUMBER=${{ github.event.inputs.build }} | |
#replace version | |
sed -i -r "/version:/s/([0-9]+).([0-9]+).([0-9]+)/${VERSION}/" ./snap/snapcraft.yaml | |
#replace link to archive to test | |
sed -i -e '/source:/s|http://download.onlyoffice.com/install|https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com|' ./snap/snapcraft.yaml | |
sed -i -e '/source:/s|editors/linux|linux/generic|' ./snap/snapcraft.yaml | |
sed -i -e "/source:/s|-x64|-${BUILD_NUMBER}-x86_64|" ./snap/snapcraft.yaml | |
- name: Build snap | |
uses: snapcore/action-build@v1 | |
id: build | |
- name: Publish snap | |
uses: snapcore/action-publish@v1 | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} | |
with: | |
snap: ${{ steps.build.outputs.snap }} | |
release: beta | |
- name: Notice for revision | |
run: | | |
REVISION=$(cat /home/runner/runners/*/_diag/pages/*.log | grep Revision | awk '{print $3}') | |
for STR in $REVISION; do | |
echo "::notice::Snap published to revision $STR" | |
done | |