Skip to content

Integrate PyOCD distribution #48

Integrate PyOCD distribution

Integrate PyOCD distribution #48

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
merge_group:
release:
types: [published]
jobs:
build:
name: Build and test
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.2.0
with:
node-version-file: package.json
registry-url: https://npm.pkg.github.com
always-auth: true
- name: Build
env:
GITHUB_TOKEN: ${{github.token}}
run: yarn --frozen-lockfile
- name: Test
run: yarn test
- name: Upload build
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.6.0
with:
name: build
path: |
./node_modules
./dist
retention-days: 1
package:
name: Package
runs-on: [ubuntu-latest]
needs: build
strategy:
fail-fast: true
matrix:
target:
- win32-x64
- win32-arm64
- linux-x64
- linux-arm64
- darwin-x64
- darwin-arm64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.2.0
with:
node-version-file: package.json
registry-url: https://npm.pkg.github.com
always-auth: true
- name: Download build
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build
- name: Download tools[${{ matrix.target }}]
run: |
yarn --frozen-lockfile --ignore-scripts
yarn download-tools --target ${{ matrix.target }}
- name: Create vsix package [${{ matrix.target }}]
run: |
yarn package --target ${{ matrix.target }}
- name: Upload package
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.6.0
with:
name: vsix-package-${{ matrix.target }}
path: ./*.vsix
retention-days: 1
publish:
name: Publish release
runs-on: [ubuntu-latest]
if: github.event_name == 'release'
needs: package
steps:
- name: Download packages
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: vsix-package-*
- run: find .
- name: Attach packages
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
files: "*.vsix"