Updated version to 1.0.5 for packaging. #22
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| tags: | |
| - 'v[1-9].*' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Restore C# dependencies | |
| run: dotnet restore | |
| - name: Restore eslint-config-rock-recommended dependencies | |
| run: npm ci | |
| working-directory: ./src/eslint-config-rock-recommended | |
| - name: Restore obsidian-build-tools dependencies | |
| run: npm ci | |
| working-directory: ./src/obsidian-build-tools | |
| - name: Build C# | |
| run: dotnet build --no-restore | |
| - name: Build obsidian-build-tools | |
| run: npm run build | |
| working-directory: ./src/obsidian-build-tools | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal | |
| - name: Pack C# | |
| run: dotnet pack --output . | |
| - name: Pack obsidian-build-tools | |
| run: npm pack --pack-destination ../.. | |
| working-directory: ./src/obsidian-build-tools | |
| - name: Pack eslint-config-rock-recommended | |
| run: npm pack --pack-destination ../.. | |
| working-directory: ./src/eslint-config-rock-recommended | |
| - name: Archive NuGet packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages | |
| path: "*.nupkg" | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Archive npm packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-packages | |
| path: "*.tgz" | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Publish eslint-config-rock-recommended | |
| run: npm publish --access public | |
| working-directory: ./src/eslint-config-rock-recommended | |
| - name: Publish obsidian-build-tools | |
| run: npm publish --access public | |
| working-directory: ./src/obsidian-build-tools | |
| # Get a short-lived NuGet API key | |
| - name: NuGet login | |
| uses: NuGet/login@v1 | |
| id: login | |
| with: | |
| user: SparkDevNetwork | |
| - name: Publish | |
| run: dotnet nuget push *.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |