forked from coolchyni/fpctoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.93 KB
/
Copy pathmain.yml
File metadata and controls
71 lines (59 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Publish FpcToolKit to VS Code Marketplace and GitHub Releases
name: Publish FpcToolKit
on:
push:
tags:
- '*'
workflow_dispatch:
permissions:
contents: write
jobs:
release:
strategy:
matrix:
include:
- target: win32-x64
pasls_dir: pasls-x86_64-win64
- target: win32-arm64
pasls_dir: pasls-x86_64-win64
- target: linux-x64
pasls_dir: pasls-x86_64-linux
- target: linux-arm64
pasls_dir: pasls-aarch64-linux
- target: darwin-x64
pasls_dir: pasls-x86_64-darwin
- target: darwin-arm64
pasls_dir: pasls-aarch64-darwin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install System Dependencies
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev
- name: Install Dependencies
run: npm ci
- name: Install @vscode/vsce
run: npm i -g @vscode/vsce
- name: Prepare Platform Binary
run: |
cd bin
find . -mindepth 1 -maxdepth 1 -type d ! -name "${{ matrix.pasls_dir }}" ! -name "debug" -exec rm -rf {} +
- name: Build and Package
id: asset
run: |
vsce package --target ${{ matrix.target }}
echo "vsix_path=$(ls *.vsix)" >> $GITHUB_OUTPUT
- name: Create or Update Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: ${{ steps.asset.outputs.vsix_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Marketplace
if: startsWith(github.ref, 'refs/tags/')
run: vsce publish -p ${{ secrets.VSCE_PAT }} --target ${{ matrix.target }}