Skip to content

Commit

Permalink
Slightly improve ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mthh committed Jul 30, 2024
1 parent 7d3c682 commit ea67ddb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish the Docker image of Magrit on new tags
on:
push:
tags:
- '*'
- "v*.*.*"
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
Expand Down
44 changes: 27 additions & 17 deletions .github/workflows/electron-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build the Electron version of Magrit

on:
push:
# tags:
# - '*'
tags:
- "v*.*.*"
branches:
- dev

Expand Down Expand Up @@ -42,18 +42,27 @@ jobs:
id: get_version
run: echo "::set-output name=version::$(node -p -e "require('./package.json').version")"

- name: Upload artifacts
- name: Upload .exe artifacts
uses: actions/upload-artifact@v2
with:
name: windows-build
path: release/${{ steps.get_version.outputs.version }}/*.exe

- name: Upload .AppImage artifacts
uses: actions/upload-artifact@v2
with:
name: linux-windows-build
path: release/${{ steps.get_version.outputs.version }}/*.{exe,AppImage}
name: linux-build
path: release/${{ steps.get_version.outputs.version }}/*.AppImage

# - name: Upload Linux and Windows Artifacts to Release
# uses: softprops/action-gh-release@v1
# with:
# files: release/${{ steps.get_version.outputs.version }}/*.{exe,AppImage}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/${{ steps.get_version.outputs.version }}/Magrit-Windows-${{ steps.get_version.outputs.version }}-portable.exe
release/${{ steps.get_version.outputs.version }}/Magrit-Linux-${{ steps.get_version.outputs.version }}.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -89,9 +98,10 @@ jobs:
name: macos-build
path: release/${{ steps.get_version.outputs.version }}/*.dmg

# - name: Upload macOS Artifacts to Release
# uses: softprops/action-gh-release@v1
# with:
# files: release/${{ steps.get_version.outputs.version }}/*.dmg
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS Artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/${{ steps.get_version.outputs.version }}/Magrit-Mac-${{ steps.get_version.outputs.version }}-Installer.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ea67ddb

Please sign in to comment.