-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates workflow to publish jar as asset
Signed-off-by: Sean Sundberg <[email protected]>
- Loading branch information
Showing
7 changed files
with
132 additions
and
106 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,45 @@ | ||
name: Asset publish | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish-assets: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
|
||
- name: Set up JDK for x64 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: gradle | ||
|
||
- name: Setup variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
VERSION=$(cat gradle.properties | sed "s/version=//g") | ||
echo "Version: ${VERSION}" | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Build asset | ||
run: ./gradlew build | ||
|
||
- name: Upload asset | ||
id: upload-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./build/libs/openpages-support-${{ steps.variables.outputs.version }},jar | ||
asset_name: openpages-support-${{ steps.variables.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Docker build | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK for x64 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: gradle | ||
|
||
- name: Test with Gradle | ||
run: ./gradlew test | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,17 +8,71 @@ on: | |
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK for x64 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: gradle | ||
|
||
- name: Test with Gradle | ||
run: ./gradlew test | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: rlespinasse/[email protected] | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: release-drafter/release-drafter@v5 | ||
- name: Create release | ||
id: create-release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
config-name: release-drafter.yaml | ||
publish: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
VERSION=$(echo "${{ steps.create-release.outputs.tag_name }}" | | sed "s/v//g") | ||
echo "Version: ${VERSION}" | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Update gradle.properties | ||
run: echo "version=${{ steps.variables.outputs.version }}" > gradle.properties | ||
|
||
- name: Commit gradle.properties | ||
run: | | ||
git config --local user.email [email protected] | ||
git config --local user.name "Cloud-Native Toolkit" | ||
git commit -a -m "Update version to ${{ steps.variables.outputs.version }}" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish release | ||
id: publish-release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
config-name: release-drafter.yaml | ||
publish: true | ||
env: | ||
|
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 @@ | ||
8 |
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
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 @@ | ||
version=0.2.3 |