Skip to content

Commit

Permalink
Update publish workflows to react to release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
unreadablewxy committed Dec 24, 2020
1 parent 25e3b8e commit c59617f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 43 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/publish-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
name: Linux-Publish

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
build:
Expand All @@ -28,49 +27,50 @@ jobs:

- run: npm run release

- name: Create Release
id: create_release
uses: actions/create-release@v1
- run: zip --junk-paths build/ATTRIBUTION.linux.zip build/ATTRIBUTION.*.json

- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
GITHUB_TOKEN: ${{ github.token }}

- name: Upload debian installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: deb-installer
asset_path: dist/fs-viewer*.deb
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-linux-${{ github.event.release.tag_name }}.deb
asset_path: dist/fs-viewer_${{ github.event.release.tag_name }}_amd64.deb
asset_content_type: application/octlet-stream

- name: Upload RPM installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: rpm-installer
asset_path: dist/fs-viewer*.rpm
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-linux-${{ github.event.release.tag_name }}.rpm
asset_path: dist/fs-viewer-${{ github.event.release.tag_name }}.x86_64.rpm
asset_content_type: application/octlet-stream

- name: Upload ASAR archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: linux-asar
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-linux-${{ github.event.release.tag_name }}.app.asar
asset_path: dist/linux-unpacked/resources/app.asar
asset_content_type: application/octlet-stream

- name: Upload attribution files
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: linux-attributions
asset_path: build/ATTRIBUTION.*.json
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-linux-attributions-${{ github.event.release.tag_name }}.zip
asset_path: build/ATTRIBUTION.linux.zip
asset_content_type: application/zip
39 changes: 19 additions & 20 deletions .github/workflows/publish-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
name: Windows-Publish

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
build:
Expand All @@ -31,40 +30,40 @@ jobs:

- run: npm run release

- name: Create Release
id: create_release
uses: actions/create-release@v1
- run: Compress-Archive build/ATTRIBUTION.*.json build/ATTRIBUTION.win.zip

- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
GITHUB_TOKEN: ${{ github.token }}

- name: Upload windows installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: win-installer
asset_path: dist/fs-viewer*.exe
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-win-${{ github.event.release.tag_name }}.exe
asset_path: dist/fs-viewer Setup ${{ github.event.release.tag_name }}.exe
asset_content_type: application/octet-stream

- name: Upload ASAR archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: win-asar
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-win-${{ github.event.release.tag_name }}.app.asar
asset_path: dist/win-unpacked/resources/app.asar
asset_content_type: application/octet-stream

- name: Upload attribution files
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: win-attributions
asset_path: build/ATTRIBUTION.*.json
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: fs-viewer-win-attributions-${{ github.event.release.tag_name }}.zip
asset_path: build/ATTRIBUTION.win.zip
asset_content_type: application/zip

0 comments on commit c59617f

Please sign in to comment.