Merge pull request #253 from paulober/dependabot/npm_and_yarn/rollup-… #542
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: Build MicroPico extension | |
on: | |
pull_request: ~ | |
push: | |
branches-ignore: | |
- "dependabot/**" | |
paths-ignore: | |
- ".idea/**" | |
- ".vscode/**" | |
- "scripts/**" | |
- "**/*.md" | |
- ".prettierrc.json" | |
- "LICENSE" | |
- ".editorconfig" | |
- ".eslintrc.json" | |
permissions: | |
contents: read | |
packages: read | |
jobs: | |
build: | |
name: "Build ubuntu-latest" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node v20.14.0 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.14.0" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@paulober" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'npm' | |
- name: Setup Python v3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install NPM Dependencies And Download Stubs | |
shell: bash | |
run: | | |
sed -i '1i//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' .npmrc | |
npm ci --no-audit | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get Short Commit SHA | |
run: | | |
short_sha=$(git rev-parse --short "$GITHUB_SHA") | |
echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV | |
- name: Run Package Script | |
run: | | |
chmod +x ./scripts/package.sh | |
./scripts/package.sh | |
env: | |
RELEASE_TAG_NAME: ${{ env.SHORT_SHA }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: micropico-${{ env.SHORT_SHA }}.vsix | |
path: micropico-${{ env.SHORT_SHA }}.vsix |