v4.0.0 #72
Workflow file for this run
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: Publish to Marketplace | |
on: | |
release: | |
types: [published] | |
permissions: | |
# read is not enought for editing releases | |
contents: write | |
deployments: write | |
packages: write | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node v20.9.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 }} | |
- 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: Run Publish Script | |
run: | | |
chmod +x ./scripts/publish.sh | |
./scripts/publish.sh | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }} | |
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MicroPico ${{ github.event.release.tag_name }} | |
path: micropico-*.vsix | |
- name: Upload Artifact To Release | |
#gh api --method POST -H "Accept: application/vnd.github+json" /repos/paulober/MicroPico/releases/$RELEASE_ID/assets | |
run: gh release upload $RELEASE_TAG_NAME micropico-*.vsix | |
env: | |
#RELEASE_ID: $ {{ github.event.release.id }} | |
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |