-
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.
- Loading branch information
1 parent
dd01d85
commit 338a231
Showing
1 changed file
with
142 additions
and
0 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,142 @@ | ||
# test | ||
name: Publish package to GitHub Packages | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
- name: Build | ||
run: bash build-linux.sh | ||
- name: Upload math result for job Linux | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-lib | ||
path: src/main/resources/linux-x86_64/* | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- uses: microsoft/[email protected] | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
- name: Build | ||
run: bash build-windows.sh | ||
- name: Upload math result for job Windows | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: win-lib | ||
path: src/main/resources/windows-x86_64/* | ||
|
||
macos: | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
- name: Build | ||
run: bash build-mac.sh | ||
- name: Upload math result for job Mac | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mac-lib | ||
path: src/main/resources/macosx-x86_64/* | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [macos,windows,linux] | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | ||
- name: Set output | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
- name: Check output | ||
env: | ||
VERSION_SEMVER: ${{ steps.vars.outputs.tag }} | ||
run: | | ||
echo $VERSION_SEMVER | ||
echo ${{ steps.vars.outputs.tag }} | ||
- name: Download math result for job Windows | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: win-lib | ||
path: src/main/resources/windows-x86_64/ | ||
|
||
- name: Download math result for job Linux | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: linux-lib | ||
path: src/main/resources/linux-x86_64/ | ||
- name: Download math result for job Mac | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: mac-lib | ||
path: src/main/resources/macosx-x86_64/ | ||
- name: Print Working Dir | ||
run: | | ||
ls -al . | ||
sudo apt install gnupg1 | ||
- name: Publish package | ||
run: bash publish.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION_SEMVER: ${{ steps.vars.outputs.tag }} | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | ||
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | ||
OSSRH_GPG_SECRET_KEY_ID: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} | ||
|
||
- name: Print Output Dir | ||
run: | | ||
ls -al | ||
ls -al build | ||
ls -al build/libs/ | ||
- name: Make gitHub release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: ${{ steps.version.outputs.version }} | ||
tag_name: ${{ github.ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: upload MuJoCo jar artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: mujoco-java.jar | ||
asset_name: mujoco-java.jar | ||
asset_content_type: application/jar | ||
|