From e33bdd3baad5b8ea66a850fed6bf0f3cff52a6ef Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 15 Feb 2026 11:15:44 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20add=20release=20workflow=20=E2=80=94=20?= =?UTF-8?q?tag=20v*=20to=20build=20+=20publish=20all=20platform=20binaries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2fa5597d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,93 @@ +name: Release OCcode + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + build-extension: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install dependencies + run: npm ci + working-directory: apps/extension + - name: Compile extension + run: npm run compile + working-directory: apps/extension + - name: Package VSIX + run: npx @vscode/vsce package --no-dependencies --skip-license --no-git-tag-version --allow-missing-repository + working-directory: apps/extension + - uses: actions/upload-artifact@v4 + with: + name: extension-vsix + path: apps/extension/*.vsix + + build-wrapper: + strategy: + matrix: + include: + - os: ubuntu-latest + platform: linux + - os: macos-latest + platform: mac + - os: windows-latest + platform: win + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install dependencies + run: npm ci + working-directory: apps/wrapper + - name: Build Electron app + run: npm run build:${{ matrix.platform }} + working-directory: apps/wrapper + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/upload-artifact@v4 + with: + name: occode-${{ matrix.platform }} + path: | + apps/wrapper/dist/*.exe + apps/wrapper/dist/*.dmg + apps/wrapper/dist/*.AppImage + apps/wrapper/dist/*.deb + apps/wrapper/dist/*.zip + + release: + needs: [build-extension, build-wrapper] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: List artifacts + run: find artifacts -type f | head -30 + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + draft: false + files: | + artifacts/**/*.exe + artifacts/**/*.dmg + artifacts/**/*.AppImage + artifacts/**/*.deb + artifacts/**/*.zip + artifacts/**/*.vsix + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}