-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed desktop:dist, added github actions
- Loading branch information
1 parent
13d57d4
commit e801823
Showing
2 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release Upload | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
shared-outputs: | ||
name: Shared Outputs | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.modified_tag.outputs.version }} | ||
steps: | ||
- id: modified_tag | ||
name: Modify Tag | ||
run: | | ||
tag_name="${{ github.event.release.tag_name }}" | ||
version=$(echo "$tag_name" | sed "s/v//") | ||
echo "::set-output name=version::$version" | ||
release: | ||
name: Upload Release Assets | ||
runs-on: ubuntu-latest | ||
needs: shared-outputs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
- name: Build with Gradle | ||
run: ./gradlew desktop:dist | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./desktop/build/libs/desktop-1.0.jar | ||
asset_name: TrackShooter-${{ needs.shared-outputs.outputs.version }}.jar | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters