Skip to content

Commit

Permalink
publish.yml fix
Browse files Browse the repository at this point in the history
publish.yml checkout fix
  • Loading branch information
jackschedel committed Jan 8, 2024
1 parent 7bf01c4 commit 6890c29
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ jobs:

- name: Get version from package.json
id: packageJson
uses: RadovanPelka/github-action-json@main
with:
path: 'package.json'
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV

- name: Use Node.js 18
uses: actions/setup-node@v3
Expand Down Expand Up @@ -73,21 +71,14 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Commit substring
uses: bhowell2/[email protected]
id: committag
with:
value: ${{ github.sha }}
length_from_start: 7

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}-${{ github.run_id }}
release_name: Automated Release for ${{ steps.committag.outputs.substring }}
release_name: v${{env.PACKAGE_VERSION}}
draft: false
prerelease: false

Expand All @@ -100,8 +91,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-Linux/koala-client-${{steps.packageJson.outputs.version}}-linux-x86_64.AppImage
asset_name: KoalaClient-${{steps.packageJson.outputs.version}}-linux-x86_64.AppImage
asset_path: ./release-Linux/koala-client-${{env.PACKAGE_VERSION}}-linux-x86_64.AppImage
asset_name: KoalaClient-${{env.PACKAGE_VERSION}}-linux-x86_64.AppImage
asset_content_type: application

- name: Upload Release Asset - MacOS
Expand All @@ -110,8 +101,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-macOS/koala-client-${{steps.packageJson.outputs.version}}-mac-x64.dmg
asset_name: KoalaClient-${{steps.packageJson.outputs.version}}-mac-x64.dmg
asset_path: ./release-macOS/koala-client-${{env.PACKAGE_VERSION}}-mac-x64.dmg
asset_name: KoalaClient-${{env.PACKAGE_VERSION}}-mac-x64.dmg
asset_content_type: application

- name: Upload Release Asset - Windows
Expand All @@ -120,8 +111,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-Windows/koala-client-${{steps.packageJson.outputs.version}}-win-x64.exe
asset_name: KoalaClient-${{steps.packageJson.outputs.version}}-win-x64.exe
asset_path: ./release-Windows/koala-client-${{env.PACKAGE_VERSION}}-win-x64.exe
asset_name: KoalaClient-${{env.PACKAGE_VERSION}}-win-x64.exe
asset_content_type: application

- name: Zip Unpacked Release - Windows
Expand All @@ -137,7 +128,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-Windows/win-unpacked.zip
asset_name: KoalaClient-${{steps.packageJson.outputs.version}}-win-x64-portable.zip
asset_name: KoalaClient-${{env.PACKAGE_VERSION}}-win-x64-portable.zip
asset_content_type: zip

- name: Zip Hash Info
Expand Down

0 comments on commit 6890c29

Please sign in to comment.