Merge pull request #373 from SchoofsKelvin/issue/372

Update workflows to use ubuntu-22.04 and updated dependencies (closes #372)
pull/374/head
Kelvin Schoofs 2 years ago committed by GitHub
commit 4046414b1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,71 +6,51 @@ on:
tags: ['**'] tags: ['**']
branches: branches:
- '*' - '*'
- 'issue/**'
- 'feature/**' - 'feature/**'
- 'release/**' - 'release/**'
pull_request: pull_request:
types: [opened, synchronize] types: [opened, synchronize]
branches: branches:
- '*' - '*'
- 'issue/**'
- 'feature/**' - 'feature/**'
- 'release/**' - 'release/**'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
name: Build and package name: Build and package
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Event Utilities - name: Event Utilities
uses: SchoofsKelvin/event-utilities@v1 uses: SchoofsKelvin/event-utilities@v1.1.0
id: utils id: utils
with: with:
artifact_prefix: "vscode-sshfs" artifact_prefix: "vscode-sshfs"
artifact_extension: "vsix" artifact_extension: "vsix"
- name: Use Node.js 14.x - name: Use Node.js 18
uses: actions/setup-node@v1 uses: actions/setup-node@v3
with: with:
node-version: 14.x node-version: 18
- name: Get Yarn cache directory cache: yarn
id: yarn-cache cache-dependency-path: .yarn/yarn.lock
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn cache
uses: actions/cache@v2.1.4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn --immutable run: yarn --immutable
- name: Build extension - name: Build extension
run: yarn vsce package -o ${{ steps.utils.outputs.artifact_name }} --yarn --no-dependencies run: yarn vsce package -o ${{ steps.utils.outputs.artifact_name }} --yarn --no-dependencies
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.1 uses: actions/upload-artifact@v3
with: with:
name: ${{ steps.utils.outputs.artifact_name }} name: ${{ steps.utils.outputs.artifact_name }}
path: ${{ steps.utils.outputs.artifact_name }} path: ${{ steps.utils.outputs.artifact_name }}
if-no-files-found: error if-no-files-found: error
- name: Create release - name: Create release with artifact
id: create_release
if: ${{ success() && steps.utils.outputs.tag_version }} if: ${{ success() && steps.utils.outputs.tag_version }}
uses: actions/create-release@v1 uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref }} name: Release ${{ steps.utils.outputs.tag_version }}
release_name: Release ${{ steps.utils.outputs.tag_version }}
draft: true draft: true
- name: Upload release asset files: ${{ steps.utils.outputs.artifact_name }}
id: upload_release_asset
if: ${{ success() && steps.utils.outputs.tag_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.utils.outputs.artifact_name }}
asset_name: ${{ steps.utils.outputs.artifact_name }}
asset_content_type: application/vsix

@ -15,11 +15,10 @@ jobs:
- name: Validate extension file - name: Validate extension file
run: unzip -f extension.vsix extension/package.json run: unzip -f extension.vsix extension/package.json
- name: Publish to Open VSX Registry - name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v0 uses: HaaLeo/publish-vscode-extension@v1
with: with:
pat: ${{ secrets.OPEN_VSX_TOKEN }} pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: extension.vsix extensionFile: extension.vsix
packagePath: ''
vs: vs:
name: "Visual Studio Marketplace" name: "Visual Studio Marketplace"
if: endsWith(github.event.release.assets[0].name, '.vsix') if: endsWith(github.event.release.assets[0].name, '.vsix')
@ -30,9 +29,8 @@ jobs:
- name: Validate extension file - name: Validate extension file
run: unzip -f extension.vsix extension/package.json run: unzip -f extension.vsix extension/package.json
- name: Publish to Visual Studio Marketplace - name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v0 uses: HaaLeo/publish-vscode-extension@v1
with: with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com registryUrl: https://marketplace.visualstudio.com
extensionFile: extension.vsix extensionFile: extension.vsix
packagePath: ''

@ -45,6 +45,12 @@
- Upgrade a bunch of plugins and other dependencies - Upgrade a bunch of plugins and other dependencies
- Fix linter warnings in Markdown files and remove default webview/README.md - Fix linter warnings in Markdown files and remove default webview/README.md
- Fix build workflow to account for incompatibility from using a new `vsce` version - Fix build workflow to account for incompatibility from using a new `vsce` version
- Updated the GitHub workflows (#372)
- Added `issue/**` to the `push` and `pull_request` triggers to automatically build on these branches
- The build workflow upgraded from `ubuntu-18.04` to `ubuntu-22.04`
- All actions are upgraded to a more recent version
- Caching of Yarn dependencies is now handled by `actions/setup-node`
- Migrated from `actions/create-release` and `actions/upload-release-asset` to `softprops/action-gh-release`
## v1.25.0 (2022-06-01) ## v1.25.0 (2022-06-01)

Loading…
Cancel
Save