diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml index e3765489..16a1c210 100644 --- a/.github/workflows/release-beta.yml +++ b/.github/workflows/release-beta.yml @@ -5,12 +5,15 @@ on: - dev workflow_dispatch: +env: + PACKAGE_NAME: 'fm-localized' + MS_URL: 'https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta' + VSX_URL: 'https://open-vsx.org/extension/eliostruyf/vscode-front-matter-beta' + jobs: - build: + localization: name: 'Build and release' runs-on: ubuntu-latest - environment: - name: Beta steps: - uses: actions/checkout@v4 @@ -18,13 +21,11 @@ jobs: with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install the dependencies run: npm ci - - name: Prepare BETA - run: node scripts/beta-release.js $GITHUB_RUN_ID - - name: Run localization sync run: npm run localization:sync env: @@ -32,8 +33,64 @@ jobs: TRANSLATION_API_LOCATION: ${{ secrets.TRANSLATION_API_LOCATION }} TRANSLATION_API_URL: ${{ secrets.TRANSLATION_API_URL }} + - name: Remove the node_modules + run: rm -rf node_modules + + - uses: actions/upload-artifact@v4 + with: + name: ${{ env.PACKAGE_NAME }} + path: . + + release-ms: + name: 'Release to VSCode Marketplace' + runs-on: ubuntu-latest + environment: + name: 'MS - BETA' + url: ${{ env.MS_URL }} + + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ env.PACKAGE_NAME }} + + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + cache: 'npm' + + - name: Install the dependencies + run: npm ci + + - name: Prepare BETA + run: node scripts/beta-release.js $GITHUB_RUN_ID + - name: Publish run: npx @vscode/vsce publish -p ${{ secrets.VSCE_PAT }} --baseImagesUrl https://raw.githubusercontent.com/estruyf/vscode-front-matter/dev + release-vsx: + name: 'Release to Open VSX' + runs-on: ubuntu-latest + environment: + name: 'Open VSX - BETA' + url: ${{ env.VSX_URL }} + + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ env.PACKAGE_NAME }} + + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + cache: 'npm' + + - name: Install the dependencies + run: npm ci + + - name: Prepare BETA + run: node scripts/beta-release.js $GITHUB_RUN_ID + - name: Publish to open-vsx.org run: npx ovsx publish -p ${{ secrets.OPEN_VSX_PAT }}