Skip to content

Commit

Permalink
updated GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kuba committed Dec 13, 2023
1 parent 67391e3 commit 6d174e7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
name: Java 17 test build
steps:
- name: "Check out code"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "Set up JDK"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "zulu"
Expand Down
43 changes: 15 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,25 @@ on:

jobs:
publish:
name: "Build and upload release asset"
name: "build and upload release asset"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Check out code"
uses: actions/checkout@v3
- name: "Set up JDK"
uses: actions/setup-java@v3
- name: "check out code"
uses: actions/checkout@v4

- name: "set up JDK"
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "zulu"
cache: 'maven'
- name: "Compile and package"
run: mvn -B clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Create Release"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: "Upload Release Asset"
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "compile and package"
run: mvn -B clean install

- name: "create release and upload assets"
uses: ncipollo/release-action@v1
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: pbsmon/target/pbsmon2.war
asset_name: pbsmon2.war
asset_content_type: application/x-webarchive
artifacts: "pbsmon/target/pbsmon2.war"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://github.com/martin-kuba/metacentrum-accounting/workflows/Java%20Matrix%20CI/badge.svg)
![](https://github.com/CESNET/metacentrum-accounting/workflows/Java%20Matrix%20CI/badge.svg)

# metacentrum-accounting
Accounting for MetaCentrum
Expand Down
4 changes: 2 additions & 2 deletions cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub martin-kuba Apache Maven Packages</name>
<url>https://maven.pkg.github.com/martin-kuba/metacentrum-accounting</url>
<name>GitHub CESNET Apache Maven Packages</name>
<url>https://maven.pkg.github.com/CESNET/metacentrum-accounting</url>
</repository>
</distributionManagement>

Expand Down

0 comments on commit 6d174e7

Please sign in to comment.