name: Build extension on: push: tags: ['**'] branches: - '*' - 'issue/**' - 'feature/**' - 'release/**' pull_request: types: [opened, synchronize] branches: - '*' - 'issue/**' - 'feature/**' - 'release/**' workflow_dispatch: jobs: build: runs-on: ubuntu-22.04 name: Build and package timeout-minutes: 10 steps: - uses: actions/checkout@v3 - name: Event Utilities uses: SchoofsKelvin/event-utilities@v1.1.0 id: utils with: artifact_prefix: "vscode-sshfs" artifact_extension: "vsix" - name: Use Node.js 18 uses: actions/setup-node@v3 with: node-version: 18 cache: yarn cache-dependency-path: .yarn/yarn.lock - name: Install dependencies run: yarn --immutable - name: Build extension run: yarn vsce package -o ${{ steps.utils.outputs.artifact_name }} --yarn --no-dependencies - name: Upload a Build Artifact uses: actions/upload-artifact@v3 with: name: ${{ steps.utils.outputs.artifact_name }} path: ${{ steps.utils.outputs.artifact_name }} if-no-files-found: error - name: Create release with artifact if: ${{ success() && steps.utils.outputs.tag_version }} uses: softprops/action-gh-release@v1 with: name: Release ${{ steps.utils.outputs.tag_version }} draft: true files: ${{ steps.utils.outputs.artifact_name }}