Skip to content

Publish

Publish #1262

Workflow file for this run

name: Publish
on:
schedule:
- cron: "10 0 * * *"
workflow_dispatch:
jobs:
check_sha:
name: check_sha
runs-on: ubuntu-latest
outputs:
hit: ${{ steps.cache.outputs.cache-hit == 'true' }}
steps:
- run: touch dummy.txt
- uses: actions/cache@v4
id: cache
with:
path: dummy.txt
key: check-sha-${{ github.sha }}
nighty_web:
name: Web
needs: check_sha
if: needs.check_sha.outputs.hit == 'false'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm install
- run: node ./scripts/update-version.js alpha ${{github.run_number}}
- run: npm run build
- run: npm pack
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
- run: npm publish --access public --tag alpha
env:
NODE_AUTH_TOKEN: ${{secrets.NPMJS_AUTH_TOKEN}}
nightly_csharp:
name: C#
needs: check_sha
if: needs.check_sha.outputs.hit == 'false'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8"
- run: npm install
- run: node ./scripts/update-csharp-version.js alpha ${{github.run_number}}
- run: npm run build-csharp
- run: dotnet nuget push src.csharp\AlphaTab\bin\Release\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
- run: dotnet nuget push src.csharp\AlphaTab.Windows\bin\Release\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
nightly_kotlin_android:
name: Kotlin (Android)
needs: check_sha
if: needs.check_sha.outputs.hit == 'false'
runs-on: windows-latest
env:
KOTLIN_REQUIRE_SIGNING: true
OSSRH_USERNAME: ${{secrets.OSSRH_USERNAME}}
OSSRH_PASSWORD: ${{secrets.OSSRH_PASSWORD}}
OSSRH_USERTOKEN_USERNAME: ${{secrets.OSSRH_USERTOKEN_USERNAME}}
OSSRH_USERTOKEN_PASSWORD: ${{secrets.OSSRH_USERTOKEN_PASSWORD}}
SONATYPE_STAGING_PROFILE_ID: ${{secrets.SONATYPE_STAGING_PROFILE_ID}}
SONATYPE_SIGNING_KEY_ID: ${{secrets.SONATYPE_SIGNING_KEY_ID}}
SONATYPE_SIGNING_PASSWORD: ${{secrets.SONATYPE_SIGNING_PASSWORD}}
SONATYPE_SIGNING_KEY: ${{secrets.SONATYPE_SIGNING_KEY}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- uses: actions/setup-java@v4
with:
java-version: "19"
distribution: "temurin"
- run: npm install
- run: node ./scripts/update-kotlin-version.js SNAPSHOT
- run: npm run build-kotlin
- run: .\gradlew.bat publishAllPublicationsToSonatypeRepository closeAndReleaseSonatypeStagingRepository
working-directory: ./src.kotlin/alphaTab/
- run: .\gradlew.bat --stop
working-directory: ./src.kotlin/alphaTab/