Skip to content

Commit

Permalink
Added npm publish config and fix release (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
shivasurya authored Jul 14, 2024
1 parent 1ad86e5 commit 416b831
Show file tree
Hide file tree
Showing 4 changed files with 755 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
run: |
cd sourcecode-parser
sha256sum pathfinder-linux-amd64 > pathfinder-linux-amd64.sha256sum.txt
tar -czvf pathfinder-linux-amd64.tar.gz pathfinder-linux-amd64
- name: Upload Linux Release Asset
uses: actions/upload-artifact@v3
Expand All @@ -39,6 +40,7 @@ jobs:
path: |
sourcecode-parser/pathfinder-linux-amd64
sourcecode-parser/pathfinder-linux-amd64.sha256sum.txt
sourcecode-parser/pathfinder-linux-amd64.tar.gz
build-windows:
runs-on: windows-latest
Expand All @@ -60,6 +62,7 @@ jobs:
run: |
cd sourcecode-parser
Get-FileHash -Algorithm SHA256 pathfinder-windows-amd64.exe | Select-Object Hash | Out-File -Encoding UTF8 pathfinder-windows-amd64.exe.sha256sum.txt
Compress-Archive -Path pathfinder-windows-amd64.exe -DestinationPath pathfinder-windows-amd64.zip
- name: Upload Windows Release Asset
uses: actions/upload-artifact@v3
Expand All @@ -68,6 +71,7 @@ jobs:
path: |
sourcecode-parser/pathfinder-windows-amd64.exe
sourcecode-parser/pathfinder-windows-amd64.exe.sha256sum.txt
sourcecode-parser/pathfinder-windows-amd64.zip
build-macos:
runs-on: macos-latest
Expand All @@ -89,6 +93,7 @@ jobs:
run: |
cd sourcecode-parser
shasum -a 256 pathfinder-darwin-amd64 > pathfinder-darwin-amd64.sha256sum.txt
tar -czvf pathfinder-darwin-amd64.tar.gz pathfinder-darwin-amd64
- name: Upload macOS Release Asset
uses: actions/upload-artifact@v3
Expand All @@ -97,6 +102,7 @@ jobs:
path: |
sourcecode-parser/pathfinder-darwin-amd64
sourcecode-parser/pathfinder-darwin-amd64.sha256sum.txt
sourcecode-parser/pathfinder-darwin-amd64.tar.gz
release:
needs: [build-linux, build-windows, build-macos]
Expand Down Expand Up @@ -138,6 +144,16 @@ jobs:
asset_name: pathfinder-linux-amd64
asset_content_type: application/octet-stream

- name: Upload Linux tar.gz Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./pathfinder-linux-amd64.tar.gz
asset_name: pathfinder-linux-amd64.tar.gz
asset_content_type: application/gzip

- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -148,6 +164,26 @@ jobs:
asset_name: pathfinder-windows-amd64.exe
asset_content_type: application/octet-stream

- name: Upload Windows zip Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./pathfinder-windows-amd64.zip
asset_name: pathfinder-windows-amd64.zip
asset_content_type: application/zip

- name: Upload macOS tar.gz Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./pathfinder-darwin-amd64.tar.gz
asset_name: pathfinder-darwin-amd64.tar.gz
asset_content_type: application/gzip

- name: Upload macOS Release Asset
uses: actions/upload-release-asset@v1
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store

node_modules
Loading

0 comments on commit 416b831

Please sign in to comment.