This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
Publish #13
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 | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
nighty_web: | |
name: Web | |
runs-on: windows-2022 | |
steps: | |
- name: Create cache file | |
run: | | |
mkdir check-sha | |
echo ${{ github.sha }} >> github-sha.txt | |
- name: Check SHA | |
id: check_sha | |
uses: actions/cache@v2 | |
with: | |
path: check-sha | |
key: check-sha-${{ github.sha }} | |
- name: Checkout the repo | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Build Project | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: | | |
npm install | |
node ./scripts/update-version.js alpha ${{github.run_number}} | |
npm run build-ci | |
- uses: actions/setup-node@v2 | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
with: | |
node-version: '16' | |
registry-url: https://registry.npmjs.org/ | |
- name: Publish to NPM (alpha) | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: npm publish --access public --tag alpha | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPMJS_AUTH_TOKEN}} | |
nightly_csharp: | |
name: C# | |
runs-on: windows-2022 | |
steps: | |
- name: Create cache file | |
run: | | |
mkdir check-sha | |
echo ${{ github.sha }} >> github-sha.txt | |
- name: Check SHA | |
id: check_sha | |
uses: actions/cache@v2 | |
with: | |
path: check-sha | |
key: check-sha-${{ github.sha }} | |
- name: Checkout the repo | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Setup DotNet | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
6.0.x | |
- run: npm install | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
- name: Update C# Version | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: node ./scripts/update-csharp-version.js alpha ${{github.run_number}} | |
- name: Build Project | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: npm run build-csharp-ci | |
- name: Publish AlphaTab.nupkg | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: dotnet nuget push src.csharp\AlphaTab\bin\Release\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json | |
- name: Publish AlphaTab.Windows.nupkg | |
if: steps.check_sha.outputs.cache-hit != 'true' | |
run: dotnet nuget push src.csharp\AlphaTab.Windows\bin\Release\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json |