This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
Ensure to transpile typescript before used #13
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
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Make sure to be possible to create package | |
run: npx vsce package --out 'yamlfmt.vsix' | |
- name: Upload package | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: yamlfmt-${{ github.sha }}.vsix | |
path: yamlfmt.vsix | |
- name: Wait other jobs | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' | |
uses: kachick/wait-other-jobs@v3 | |
# with: | |
# skip-list: | | |
# [ | |
# { | |
# "workflowFile": "merge-bot-pr.yml" | |
# } | |
# ] | |
- name: Release in Azure Marketplace | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' | |
run: npx vsce publish | |
env: | |
VSCE_PAT: "${{ secrets.VSCE_PAT }}" | |
- name: Release in GitHub | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: yamlfmt.vsix |