chore: omit dev dependencies (#1) #4
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: msvc-dev-cmd | |
| permissions: | |
| contents: write | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run eslint | |
| run: npm run lint | |
| - name: Enable Developer Command Prompt (amd64) | |
| uses: ./ | |
| with: | |
| arch: amd64 | |
| - name: Compile and run some C code (amd64) | |
| shell: cmd | |
| run: | | |
| cl.exe hello.c | |
| hello.exe | |
| - name: Enable Developer Command Prompt (amd64_x86) | |
| uses: ./ | |
| with: | |
| arch: amd64_x86 | |
| - name: Compile and run some C code (x86) | |
| shell: cmd | |
| run: | | |
| cl.exe hello.c | |
| hello.exe | |
| - name: Enable Developer Command Prompt (amd64_arm) | |
| uses: ./ | |
| with: | |
| arch: amd64_arm | |
| - name: Compile some C code (arm) | |
| shell: cmd | |
| run: | | |
| cl.exe hello.c | |
| dumpbin /headers hello.exe | |
| - name: Enable Developer Command Prompt (amd64_arm64) | |
| uses: ./ | |
| with: | |
| arch: amd64_arm64 | |
| - name: Compile some C code (arm64) | |
| shell: cmd | |
| run: | | |
| cl.exe hello.c | |
| dumpbin /headers hello.exe | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: npm ci | |
| - run: npm audit --audit-level=moderate --production | |
| - run: npm audit --audit-level=critical | |
| alias-arch: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: npm ci --omit=dev | |
| - name: Enable Developer Command Prompt | |
| uses: ./ | |
| with: | |
| arch: Win32 | |
| - name: Compile and run some C code | |
| shell: cmd | |
| run: | | |
| cl.exe hello.c | |
| hello.exe | |
| create-release: | |
| needs: [test, audit, alias-arch] | |
| runs-on: ubuntu-latest | |
| if: (github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # allows for tags access | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Format changes | |
| id: format-changes | |
| run: | | |
| delimiter=$(openssl rand -hex 32) | |
| { | |
| echo "changelog<<$delimiter" | |
| python3 ./.CI/format-recent-changes.py | |
| echo $delimiter | |
| } >> "$GITHUB_OUTPUT" | |
| shell: bash | |
| - name: Create release | |
| uses: ncipollo/release-action@v1.21.0 | |
| with: | |
| allowUpdates: true | |
| body: ${{ steps.format-changes.outputs.changelog }} | |
| prerelease: true | |
| name: Nightly Release | |
| tag: nightly-release | |
| - name: Update nightly-release tag | |
| run: | | |
| git tag -f nightly-release | |
| git push -f origin nightly-release | |
| shell: bash |