Micronaut Starter 4.1.6 #197
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
name: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Release artifacts to Maven Central & SDKMAN, and publish documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set the current release version | |
id: release_version | |
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT | |
- name: Run pre-release | |
uses: micronaut-projects/github-actions/pre-release@master | |
env: | |
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: projectVersion is not a snapshot | |
run: ./gradlew projectVersionNotSnapshot | |
- name: Micronaut Core is not a snapshot | |
run: ./gradlew micronautCoreNotSnapshot | |
- name: Micronaut Platform is not a snapshot | |
run: ./gradlew micronautPlatformNotSnapshot | |
- name: Build All | |
run: ./gradlew micronaut-cli:assemble | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: Publish to Maven Central | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
GPG_FILE: ${{ secrets.GPG_FILE }} | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
run: echo $GPG_FILE | base64 -d > secring.gpg && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository docs | |
- name: Upload CLI Zip | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: starter-cli/build/distributions/micronaut-cli-${{ steps.release_version.outputs.release_version }}.zip | |
asset_name: micronaut-cli-${{ steps.release_version.outputs.release_version }}.zip | |
asset_content_type: application/zip | |
- name: Publish to Github Pages | |
if: success() | |
uses: micronaut-projects/github-pages-deploy-action@master | |
env: | |
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BASE_BRANCH: master | |
BRANCH: gh-pages | |
FOLDER: build/docs | |
VERSION: ${{ steps.release_version.outputs.release_version }} | |
- name: Run post-release | |
if: success() | |
id: post_release | |
continue-on-error: true | |
uses: micronaut-projects/github-actions/post-release@master | |
env: | |
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Back to Micronaut snapshot | |
continue-on-error: true | |
run: | | |
echo "Setting new Micronaut snapshot version" | |
sed -i "s/^micronautVersion.*$/micronautVersion\=${{ steps.post_release.outputs.next_version }}-SNAPSHOT/" gradle.properties | |
- uses: stefanzweifel/git-auto-commit-action@v5.0.0 | |
continue-on-error: true | |
with: | |
commit_message: Back Micronaut version to snapshot | |
commit_user_name: micronaut-build | |
commit_user_email: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
commit_author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> | |
file_pattern: gradle.properties | |
linux: | |
name: Release Linux Native CLI | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set the current release version | |
id: release_version | |
run: | | |
release_version=${GITHUB_REF:11} | |
sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties | |
echo "release_version=${release_version}" >> $GITHUB_OUTPUT | |
- name: "☕️ Setup GraalVM CE" | |
uses: graalvm/setup-graalvm@v1.1.4 | |
with: | |
version: '22.3.2' | |
java-version: '17' | |
native-image-musl: 'true' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "📸 Build the Native Image (with libc=musl)" | |
run: ./gradlew micronaut-cli:nativeCompile --no-daemon -Pmusl | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: "✅ Verify Build" | |
run: ./starter-cli/build/native/nativeCompile/mn --version | |
- name: "✅ Verify Create App" | |
run: ./starter-cli/build/native/nativeCompile/mn create-app test | |
- name: "👷♀️Package Build" | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
run: | | |
mkdir -p "mn-linux-amd64-${VERSION}/bin" | |
mv ./starter-cli/build/native/nativeCompile/mn "mn-linux-amd64-${VERSION}/bin" | |
cp ./LICENSE "mn-linux-amd64-${VERSION}/" | |
zip -r "mn-linux-amd64-${VERSION}.zip" "mn-linux-amd64-${VERSION}/" | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./mn-linux-amd64-${{ github.event.release.tag_name }}.zip | |
asset_name: mn-linux-amd64-${{ github.event.release.tag_name }}.zip | |
asset_content_type: application/zip | |
macos: | |
name: Release OS X Native CLI | |
runs-on: macos-latest | |
needs: [build] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set the current release version | |
id: release_version | |
run: | | |
release_version=${GITHUB_REF:11} | |
sed -i -e "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties | |
echo "release_version=${release_version}" >> $GITHUB_OUTPUT | |
- name: "☕️ Setup GraalVM CE" | |
uses: graalvm/setup-graalvm@v1.1.4 | |
with: | |
version: '22.3.2' | |
java-version: '17' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "📸 Build the Native Image" | |
run: ./gradlew micronaut-cli:nativeCompile --no-daemon | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: "✅ Verify Build" | |
run: ./starter-cli/build/native/nativeCompile/mn --version | |
- name: "✅ Verify Create App" | |
run: ./starter-cli/build/native/nativeCompile/mn create-app test | |
- name: Package Build | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
run: | | |
mkdir -p "mn-darwin-amd64-${VERSION}/bin" | |
mv ./starter-cli/build/native/nativeCompile/mn "mn-darwin-amd64-${VERSION}/bin" | |
cp ./LICENSE "mn-darwin-amd64-${VERSION}/" | |
zip -r "mn-darwin-amd64-${VERSION}.zip" "mn-darwin-amd64-${VERSION}/" -x '*.DS_Store*' -x '__MAC_OSX' | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./mn-darwin-amd64-${{ github.event.release.tag_name }}.zip | |
asset_name: mn-darwin-amd64-${{ github.event.release.tag_name }}.zip | |
asset_content_type: application/zip | |
windows: | |
name: Release Windows Native CLI | |
runs-on: windows-latest | |
needs: [build] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: "☕️ Setup GraalVM CE" | |
uses: graalvm/setup-graalvm@v1.1.4 | |
with: | |
version: '22.3.2' | |
java-version: '17' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "📸 Build the Native Image" | |
run: ./gradlew micronaut-cli:nativeCompile --no-daemon | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: "✅ Verify Build (Powershell)" | |
shell: powershell | |
run: ./starter-cli/build/native/nativeCompile/mn.exe --version | |
- name: "✅ Verify Create App (Powershell)" | |
run: ./starter-cli/build/native/nativeCompile/mn.exe create-app test | |
- name: "✅ Verify Build (CMD)" | |
shell: cmd | |
run: starter-cli\\build\\native\\nativeCompile\\mn --version | |
- name: "✅ Verify Create App (CMD)" | |
shell: cmd | |
run: starter-cli\\build\\native\\nativeCompile\\mn create-app test2 | |
- name: "🤐 ZIP Archive" | |
run: | | |
New-Item ./mn-win-amd64-${{ github.event.release.tag_name }}/bin -ItemType Directory -ea 0 | |
Move-Item -Path ./starter-cli/build/native/nativeCompile/mn.exe -Destination ./mn-win-amd64-${{ github.event.release.tag_name }}/bin | |
Copy-Item ./LICENSE -Destination ./mn-win-amd64-${{ github.event.release.tag_name }} | |
Compress-Archive -Path ./mn-win-amd64-${{ github.event.release.tag_name }} -Update -DestinationPath ./mn-win-amd64-${{ github.event.release.tag_name }}.zip | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./mn-win-amd64-${{ github.event.release.tag_name }}.zip | |
asset_name: mn-win-amd64-${{ github.event.release.tag_name }}.zip | |
asset_content_type: application/zip | |
sdkman: | |
name: Release to SDKMAN! | |
runs-on: ubuntu-latest | |
needs: [linux, macos, windows] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set the current release version | |
id: release_version | |
run: | | |
release_version=${GITHUB_REF:11} | |
sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties | |
echo "release_version=${release_version}" >> $GITHUB_OUTPUT | |
- name: SDKMAN release | |
env: | |
GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }} | |
GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }} | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
run: ./gradlew sdkRelease --no-daemon | |
gcr: | |
name: Deploy to Cloud Run | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set the current release version | |
id: release_version | |
run: | | |
release_version=${GITHUB_REF:11} | |
sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties | |
echo "release_version=${release_version}" >> $GITHUB_OUTPUT | |
- name: Run Tests | |
run: ./gradlew starter-api:test starter-web-netty:test starter-gcp-function:shadowJar | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: Build Docker image | |
run: | | |
./gradlew starter-web-netty:dockerBuild -PdockerImageName="gcr.io/${{ secrets.GCLOUD_PROJECT }}/micronaut-starter:${{ steps.release_version.outputs.release_version }}" | |
- name: Authenticate into Google Cloud Platform | |
uses: google-github-actions/setup-gcloud@v0.2.1 | |
with: | |
service_account_email: ${{ secrets.GCLOUD_EMAIL }} | |
service_account_key: ${{ secrets.GCLOUD_AUTH }} | |
- name: Configure Docker to use Google Cloud Platform | |
run: "gcloud auth configure-docker --quiet" | |
- name: Push image to Google Cloud Container Registry | |
run: | | |
./gradlew starter-web-netty:dockerPush -PdockerImageName="gcr.io/${{ secrets.GCLOUD_PROJECT }}/micronaut-starter:${{ steps.release_version.outputs.release_version }}" | |
- name: Deploy to Cloud Run | |
env: | |
release_version: ${{ steps.release_version.outputs.release_version }} | |
run: | | |
gcloud components install beta --quiet | |
gcloud beta run deploy micronaut-starter-latest --quiet --image gcr.io/${{ secrets.GCLOUD_PROJECT }}/micronaut-starter:${{ steps.release_version.outputs.release_version }} --project ${{ secrets.GCLOUD_PROJECT }} --region us-central1 --update-env-vars=HOSTNAME="launch.micronaut.io",GITHUB_OAUTH_APP_CLIENT_ID=${{ secrets.GH_OAUTH_CLIENT_ID }},GITHUB_OAUTH_APP_CLIENT_SECRET=${{ secrets.GH_OAUTH_CLIENT_SECRET }} --platform managed --allow-unauthenticated --service-account=${{ secrets.GCLOUD_EMAIL }} | |
version="$(echo "${release_version//./}" | tr '[A-Z]' '[a-z]')" | |
gcloud beta run deploy "micronaut-starter-$version" --quiet --image gcr.io/${{ secrets.GCLOUD_PROJECT }}/micronaut-starter:${{ steps.release_version.outputs.release_version }} --project ${{ secrets.GCLOUD_PROJECT }} --region us-central1 --update-env-vars=HOSTNAME="launch.micronaut.io",GITHUB_OAUTH_APP_CLIENT_ID=${{ secrets.GH_OAUTH_CLIENT_ID }},GITHUB_OAUTH_APP_CLIENT_SECRET=${{ secrets.GH_OAUTH_CLIENT_SECRET }} --platform managed --allow-unauthenticated --service-account=${{ secrets.GCLOUD_EMAIL }} | |
analytics: | |
name: Release Analytics Job | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set the current release version | |
id: release_version | |
run: | | |
release_version=${GITHUB_REF:11} | |
sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties | |
echo "release_version=${release_version}" >> $GITHUB_OUTPUT | |
- name: Authenticate into Google Cloud Platform | |
uses: google-github-actions/setup-gcloud@v0.2.1 | |
with: | |
service_account_email: ${{ secrets.GCLOUD_EMAIL }} | |
service_account_key: ${{ secrets.GCLOUD_AUTH }} | |
- name: Configure Docker to use Google Cloud Platform | |
run: "gcloud auth configure-docker --quiet" | |
- name: Run Tests | |
run: ./gradlew starter-analytics-postgres:test | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}" | |
- name: Build Docker image and Push it GCR | |
run: | |
./gradlew dockerPush | |
env: | |
DOCKER_TAG: ${{ steps.release_version.outputs.release_version }} | |
GCLOUD_PROJECT: ${{ secrets.GCLOUD_PROJECT }} | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
- name: Deploy to Cloud Run | |
run: | | |
gcloud components install beta --quiet | |
gcloud beta run deploy micronaut-starter-analytics --quiet --image gcr.io/${{ secrets.GCLOUD_PROJECT }}/micronaut-starter-analytics:${{ steps.release_version.outputs.release_version }} --project ${{ secrets.GCLOUD_PROJECT }} --region us-central1 --platform managed --service-account=${{ secrets.GCLOUD_EMAIL }} | |
homebrew: | |
name: Update Homebrew cask | |
needs: [macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout https://github.com/micronaut-projects/homebrew-tap | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
repository: micronaut-projects/homebrew-tap | |
- name: Download ZIP | |
run: wget -q https://github.com/micronaut-projects/micronaut-starter/releases/download/${{ github.event.release.tag_name }}/mn-darwin-amd64-${{ github.event.release.tag_name }}.zip -O mn.zip | |
- name: Calculate SHA256 | |
id: sha | |
run: | | |
s=$(sha256sum mn.zip | awk '{ print $1 }') | |
echo "SHA256 is: $s" | |
echo "sha=${s}" >> $GITHUB_OUTPUT | |
- name: Update Cask file | |
env: | |
SHA: ${{ steps.sha.outputs.sha }} | |
run: | | |
sed -i -e "s/ version.*/ version '${GITHUB_REF:11}'/" Casks/micronaut.rb | |
sed -i -e "s/sha256.*/sha256 '${SHA}'/" Casks/micronaut.rb | |
cat Casks/micronaut.rb | |
- uses: stefanzweifel/git-auto-commit-action@v5.0.0 | |
with: | |
commit_message: Update Micronaut cask to ${{ github.event.release.tag_name }} | |
commit_user_name: micronaut-build | |
commit_user_email: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
commit_author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> | |
chocolatey: | |
name: Bump Chocolatey package | |
runs-on: windows-latest | |
needs: [windows] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Download ZIP, update versions and checksum | |
id: choco | |
working-directory: chocolatey | |
shell: pwsh | |
run: | | |
Invoke-RestMethod -Uri https://github.com/micronaut-projects/micronaut-starter/releases/download/${{ github.event.release.tag_name }}/mn-win-amd64-${{ github.event.release.tag_name }}.zip -OutFile 'mn.zip' | |
$SHA = (Get-FileHash ./mn.zip -Algorithm SHA256).Hash | |
echo $SHA | |
$Version = "${{ github.event.release.tag_name }}".substring(1) | |
echo $Version | |
#Fix semver | |
$NugetVersion = $Version | |
$Parts = $Version.Split(".") | |
if ($Parts.Count -eq 4) { | |
$NugetVersion = $Parts[0] + "." + $Parts[1] + "." + $Parts[2] + "-" + $Parts[3] | |
} | |
echo $NugetVersion | |
(Get-Content ./micronaut.nuspec) -replace '<version>.*</version>', "<version>$NugetVersion</version>" | Set-Content ./micronaut.nuspec | |
Get-Content ./micronaut.nuspec | |
(Get-Content ./tools/chocolateyinstall.ps1) -replace '^\$version.*', "`$version = '$Version'" | Set-Content ./tools/chocolateyinstall.ps1 | |
(Get-Content ./tools/chocolateyinstall.ps1) -replace ' checksum\s+=.*', " checksum = '$SHA'" | Set-Content ./tools/chocolateyinstall.ps1 | |
Get-Content ./tools/chocolateyinstall.ps1 | |
echo "nuget_version=$NugetVersion" >> $env:GITHUB_OUTPUT | |
- name: Create package | |
working-directory: chocolatey | |
run: choco pack | |
- name: Push package | |
working-directory: chocolatey | |
env: | |
API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} | |
run: | | |
choco apikey --key $Env:API_KEY --source https://push.chocolatey.org/ | |
choco push micronaut.${{ steps.choco.outputs.nuget_version }}.nupkg --source https://push.chocolatey.org/ --force | |
- uses: stefanzweifel/git-auto-commit-action@v5.0.0 | |
with: | |
commit_message: Bump Micronaut Chocolatey package to ${{ github.event.release.tag_name }} | |
commit_user_name: micronaut-build | |
commit_user_email: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
commit_author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> | |
backtosnapshots: | |
name: Core and Platform to Snapshot Versions | |
runs-on: ubuntu-latest | |
needs: [chocolatey, sdkman, gcr, homebrew] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
ref: ${{ github.event.release.target_commitish }} | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Back to Micronaut Core snapshot | |
continue-on-error: true | |
run: ./gradlew micronautCoreNextSnapshot | |
- name: Back to Micronaut Platform snapshot | |
continue-on-error: true | |
run: ./gradlew micronautPlatformNextSnapshot | |
- uses: stefanzweifel/git-auto-commit-action@v5.0.0 | |
continue-on-error: true | |
with: | |
commit_message: Back Core and Platform version to snapshot | |
commit_user_name: micronaut-build | |
commit_user_email: ${{ secrets.MICRONAUT_BUILD_EMAIL }} | |
commit_author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> | |
file_pattern: gradle.properties |