Merge pull request #49 from FanaticPythoner/fix/issue-47-fix-dependab… #133
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: Latest | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '17 5 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: latest-master | |
| cancel-in-progress: true | |
| jobs: | |
| preflight: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| release_ref: ${{ steps.meta.outputs.release_ref }} | |
| release_sha: ${{ steps.meta.outputs.release_sha }} | |
| release_short_sha: ${{ steps.meta.outputs.release_short_sha }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Cache upstream parity clone | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae | |
| with: | |
| path: .tools/upstream-todo-tree | |
| key: upstream-todo-tree-7761bd02406a5c5f5bc8da944a561eb3c12a48df | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Resolve latest release metadata | |
| id: meta | |
| run: | | |
| echo "release_ref=${GITHUB_SHA}" >> "$GITHUB_OUTPUT" | |
| echo "release_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| echo "release_short_sha=$(git rev-parse --short=12 HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Run test suite | |
| run: npm test | |
| - name: Build production bundle | |
| run: npm run vscode:prepublish | |
| build: | |
| needs: preflight | |
| uses: ./.github/workflows/reusable-build-vsix.yml | |
| with: | |
| ref: ${{ needs.preflight.outputs.release_ref }} | |
| targets: '["win32-x64","win32-arm64","linux-x64","linux-arm64","linux-armhf","darwin-x64","darwin-arm64","alpine-x64","alpine-arm64","web"]' | |
| secrets: inherit | |
| github-release: | |
| needs: | |
| - preflight | |
| - build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ needs.preflight.outputs.release_ref }} | |
| - name: Download VSIX artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| with: | |
| pattern: vsix-* | |
| path: artifacts/release | |
| merge-multiple: true | |
| - name: Create or update latest GitHub release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| RELEASE_TAG: latest | |
| RELEASE_TITLE: Latest Nightly Build (${{ needs.preflight.outputs.release_short_sha }}) | |
| RELEASE_TARGET_SHA: ${{ needs.preflight.outputs.release_sha }} | |
| RELEASE_TARGET_BRANCH: master | |
| run: bash scripts/release/create-or-update-moving-github-release.sh |