forked from pronze/SBA
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
48 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 |
---|---|---|
|
@@ -7,18 +7,18 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
distribution: 'microsoft' | ||
java-version: 17 | ||
cache: 'gradle' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Read value from Properties-file | ||
id: read_property | ||
uses: Reedyuk/[email protected].1 | ||
uses: Reedyuk/[email protected].4 | ||
with: | ||
path: './gradle.properties' | ||
property: 'SBA_VERSION' | ||
|
@@ -36,27 +36,15 @@ jobs: | |
GITHUB_ACTIONS_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
GITHUB_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | ||
- name: Upload the final artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
tag_name: ${{ steps.read_property.outputs.value }}.${{ steps.vars.outputs.sha_short }}" | ||
release_name: Release ${{ steps.read_property.outputs.value }} | ||
body: Pre-release of dev version | ||
draft: false | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
asset_name: SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
asset_content_type: application/java-archive | ||
title: "Release Build ${{ steps.read_property.outputs.value }}" | ||
files: | | ||
LICENSE.txt | ||
*.jar |
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 |
---|---|---|
|
@@ -9,18 +9,18 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
distribution: 'microsoft' | ||
java-version: 17 | ||
cache: 'gradle' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Read value from Properties-file | ||
id: read_property | ||
uses: Reedyuk/[email protected].1 | ||
uses: Reedyuk/[email protected].4 | ||
with: | ||
path: './gradle.properties' | ||
property: 'SBA_VERSION' | ||
|
@@ -38,27 +38,26 @@ jobs: | |
GITHUB_ACTIONS_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
GITHUB_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | ||
- name: Upload the final artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
tag_name: ${{ steps.read_property.outputs.value }}.${{ steps.vars.outputs.sha_short }}" | ||
release_name: Release ${{ steps.read_property.outputs.value }} | ||
body: Latest release | ||
draft: false | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
asset_name: SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
asset_content_type: application/java-archive | ||
title: "Release Build ${{ steps.read_property.outputs.value }}" | ||
files: | | ||
LICENSE.txt | ||
*.jar | ||
# - name: Upload Release Asset | ||
# id: upload-release-asset | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
# asset_path: plugin/build/libs/SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
# asset_name: SBA-${{ steps.read_property.outputs.value }}-all.jar | ||
# asset_content_type: application/java-archive |