Version 2.0.1 #23
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: Publish packages | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish_nuget: | |
name: Publish package to the NuGet Gallery | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: './C Sharp/Object Validator' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.x' | |
- name: Publish package | |
run: | | |
dotnet pack --configuration Release | |
dotnet nuget push bin/Release/Quicksilver0218.ObjectValidator.*.nupkg --api-key "$NUGET_KEY" --source https://api.nuget.org/v3/index.json | |
env: | |
NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
publish_maven: | |
name: Publish package to the Maven Central Repository | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: './Java/Object Validator' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
- name: Publish package | |
run: | | |
./gradlew clean | |
./gradlew publish | |
./gradlew jreleaserDeploy | |
env: | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | |
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
MAVEN_TOKEN_USERNAME: ${{ secrets.MAVEN_TOKEN_USERNAME }} | |
MAVEN_TOKEN_PASSWORD: ${{ secrets.MAVEN_TOKEN_PASSWORD }} | |
publish_npm: | |
name: Publish package to the npm Public Registry | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: './TypeScript/Object Validator' | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Publish package | |
run: | | |
npm i | |
npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |