Skip to content

Commit

Permalink
Move snap publishing to own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Mar 5, 2020
1 parent cd70746 commit d27867f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ jobs:
export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}"
./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
shell: bash
- name: Package application image
run: ${{ matrix.archivePortable }}
shell: bash
- name: Build snap (1) Run build
uses: jhenstridge/snapcraft-build-action@v1
id: snapcraft
if: matrix.displayName == 'linux' && startsWith(github.ref,'refs/heads/master')
- name: Build snap (2) Upload snap
uses: jhenstridge/snapcraft-publish-action@v1
with:
store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: edge
if: matrix.displayName == 'linux' && startsWith(github.ref,'refs/heads/master')
- name: Rename files
run: |
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Snap

on:
schedule:
# run on each day
- cron: '33 4 * * *'

jobs:
build:
runs-on: ubuntu-latest
name: Create snapcraft image

steps:
- name: Checkout source
uses: actions/checkout@v2
# The image relies on https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz^
# See snap/snapcraft.yml for details
- name: Build snap (1) Run build
uses: jhenstridge/snapcraft-build-action@v1
id: snapcraft
- name: Build snap (2) Upload snap
uses: jhenstridge/snapcraft-publish-action@v1
with:
store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: edge

0 comments on commit d27867f

Please sign in to comment.