Skip to content

Commit

Permalink
Updating CI process to automatically add artificats to a release.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhat committed Mar 18, 2022
1 parent 1271f25 commit 3066182
Showing 1 changed file with 55 additions and 35 deletions.
90 changes: 55 additions & 35 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-headers
name: target-cache
path: |
${{github.workspace}}/target/include
${{github.workspace}}/target
if-no-files-found: error


Expand All @@ -62,8 +62,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Compile
env:
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -121,8 +121,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Compile
env:
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -181,8 +181,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
shell: bash
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -272,8 +272,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
shell: bash
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -363,8 +363,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
shell: bash
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -450,8 +450,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
shell: bash
Expand Down Expand Up @@ -507,7 +507,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -526,8 +526,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -574,7 +574,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -592,8 +592,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -638,7 +638,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -656,8 +656,8 @@ jobs:
- name: Download
uses: actions/download-artifact@v2
with:
name: native-headers
path: ${{github.workspace}}/target/include
name: target-cache
path: ${{github.workspace}}/target

- name: Setup
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -702,7 +702,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: native-libraries
name: library-resources
path: |
${{github.workspace}}/src/main/resources
if-no-files-found: error
Expand All @@ -726,10 +726,16 @@ jobs:
with:
submodules: true

- name: Download
- name: Download Cache
uses: actions/download-artifact@v2
with:
name: target-cache
path: ${{github.workspace}}/target

- name: Download Libraries
uses: actions/download-artifact@v2
with:
name: native-libraries
name: library-resources
path: ${{github.workspace}}/src/main/resources

- name: Setup Java
Expand Down Expand Up @@ -757,7 +763,7 @@ jobs:
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Snapshot
- name: Sonatype Snapshot
if: ${{ github.event_name == 'push' }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand All @@ -770,7 +776,7 @@ jobs:
--no-transfer-progress \
deploy
- name: Release
- name: Sonatype Release
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand All @@ -784,12 +790,26 @@ jobs:
--no-transfer-progress \
deploy
- name: Upload
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ci-build
name: build-artifacts
path: |
${{github.workspace}}/target/*.jar
${{github.workspace}}/target/*.asc
${{github.workspace}}/target/*.pom
if-no-files-found: error

- name: Release Artifacts
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
uses: softprops/action-gh-release@v1
with:
files: |
${{github.workspace}}/target/*.jar
${{github.workspace}}/target/*.asc
${{github.workspace}}/target/*.pom
- name: Delete Cache
uses: geekyeggo/delete-artifact@v1
with:
name: target-cache

0 comments on commit 3066182

Please sign in to comment.