TASK: Updating version in README #56
Workflow file for this run
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
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
name: AutoRelease | |
jobs: | |
# build-native: | |
# name: Build all native images | |
# continue-on-error: true | |
# strategy: | |
# matrix: | |
# include: | |
# - os: ubuntu-latest | |
# name: Linux | |
# artifact: rmf-codegen.linux | |
# - os: macos-latest | |
# name: Mac OS X | |
# artifact: rmf-codegen.darwin | |
# # TODO windows fails, reason not known yet | |
# # - os: windows-latest | |
# # name: Windows | |
# # artifact: rmf-codegen.win32 | |
# runs-on: ${{ matrix.os }} | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# | |
# - name: Setup Java | |
# uses: actions/setup-java@v3 | |
# with: | |
# distribution: 'temurin' | |
# java-version: '11' | |
# | |
# - name: Build ${{ matrix.name }} native image | |
# uses: gradle/gradle-command-action@v1 | |
# with: | |
# arguments: nativeImage | |
# build-root-directory: tools/cli-application | |
# gradle-executable: ./gradlew | |
# | |
# - name: Upload ${{ matrix.name }} native image | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: ${{ matrix.artifact }} | |
# path: ./tools/cli-application/build/graal/rmf-codegen | |
# | |
# release: | |
# name: Build JAR and Release the artifacts | |
# runs-on: ubuntu-latest | |
# needs: build-native | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# | |
# - name: Setup Java | |
# uses: actions/setup-java@v3 | |
# with: | |
# distribution: 'temurin' | |
# java-version: '11' | |
# | |
# - name: Build JAR | |
# uses: gradle/gradle-command-action@v1 | |
# with: | |
# arguments: build | |
# build-root-directory: tools/cli-application | |
# gradle-executable: ./gradlew | |
# | |
# - name: Get current date | |
# id: date | |
# run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H-%M-%S')" | |
# | |
# - name: Download native build artifacts | |
# uses: actions/download-artifact@v2 | |
# | |
# - name: Commit new version to README and install script | |
# uses: stefanzweifel/[email protected] | |
# with: | |
# commit_message: "TASK: Updating version in README" | |
# commit_user_name: Auto Mation | |
# commit_user_email: [email protected] | |
# commit_author: Auto Mation <[email protected]> | |
# | |
# - name: Create GitHub Release | |
# id: create_github_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ github.ref }} | |
# release_name: ${{ github.ref }} | |
# draft: false | |
# prerelease: false | |
# | |
# - name: Upload JAR | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_github_release.outputs.upload_url }} | |
# asset_path: rmf-codegen.jar | |
# asset_name: rmf-codegen.jar | |
# asset_content_type: application/java-archive | |
# | |
# - name: Upload Linux Binary | |
# id: upload-linux-asset | |
# uses: actions/upload-release-asset@v1 | |
# continue-on-error: true | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_github_release.outputs.upload_url }} | |
# asset_path: rmf-codegen.linux/rmf-codegen | |
# asset_name: rmf-codegen.linux | |
# asset_content_type: application/octet-stream | |
# | |
# - name: Upload Mac OS Binary | |
# id: upload-mac-asset | |
# continue-on-error: true | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_github_release.outputs.upload_url }} | |
# asset_path: rmf-codegen.darwin/rmf-codegen | |
# asset_name: rmf-codegen.darwin | |
# asset_content_type: application/octet-stream | |
# - name: Upload Windows Binary | |
# id: upload-windows-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_github_release.outputs.upload_url }} | |
# asset_path: rmf-codegen.win32/rmf-codegen | |
# asset_name: rmf-codegen.exe | |
# asset_content_type: application/octet-stream | |
release_maven: | |
name: Build and release to Maven | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- run: scripts/setup-signing-key.sh | |
env: | |
DECRYPTER: ${{ secrets.DECRYPTER }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
PASSPHRASE: ${{ secrets.PASSPHRASE }} | |
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} | |
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} | |
- name: Build and Release | |
run: ./gradlew -Pversion=${{ github.ref_name }} clean check publishMavenPublicationToSonatype closeAndReleaseSonatypeStagingRepository | |
env: | |
CTP_OSS_USER: ${{ secrets.OSS_USER }} | |
CTP_OSS_SECRET: ${{ secrets.OSS_SECRET }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "14" | |
- name: Build NPM package | |
run: | | |
./gradlew -Pversion=${{ github.ref_name }} tools:cli-application:shadowJar | |
cp rmf-codegen.jar node/rmf-codegen/bin | |
- name: Creating .npmrc | |
run: | | |
cat << EOF > "$HOME/.npmrc" | |
[email protected] | |
//registry.npmjs.org/:_authToken=$NPM_TOKEN | |
EOF | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish npm package | |
working-directory: node/rmf-codegen | |
run: yarn publish --no-git-tag-version --minor | |
bump_version: | |
name: Bump NPM version | |
needs: [release_maven] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "14" | |
- name: Publish npm package | |
working-directory: node/rmf-codegen | |
run: yarn version --no-git-tag-version --minor | |
- uses: stefanzweifel/[email protected] | |
with: | |
file_pattern: "node/rmf-codegen/package.json" | |
commit_message: "Bump codegen version" | |
commit_user_name: Auto Mation | |
commit_user_email: [email protected] | |
commit_author: Auto Mation <[email protected]> |