Skip to content

Commit 4e6d119

Browse files
Add GitHub Actions workflow to build and upload plugin artifacts for multiple OS targets
1 parent 5a6900c commit 4e6d119

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,65 @@ jobs:
7676
with:
7777
name: deweb-server_${{ matrix.target }}_${{ matrix.arch }}
7878
path: server/build/deweb-server_${{ matrix.target }}_${{ matrix.arch }}${{ matrix.ext }}
79+
80+
build-plugin:
81+
name: build and upload plugin artifact
82+
strategy:
83+
matrix:
84+
include:
85+
- os: windows-2022
86+
arch: amd64
87+
target: windows
88+
ext: .exe
89+
- os: ubuntu-20.04
90+
arch: amd64
91+
target: linux
92+
- os: ubuntu-20.04
93+
arch: arm64
94+
target: linux
95+
- os: macos-13
96+
arch: amd64
97+
target: darwin
98+
- os: macos-14
99+
arch: arm64
100+
target: darwin
101+
102+
runs-on: ${{ matrix.os }}
103+
104+
defaults:
105+
run:
106+
working-directory: ./plugin
107+
108+
steps:
109+
- name: Checkout repository
110+
uses: actions/checkout@v4
111+
112+
- name: installing dependencies
113+
uses: ./.github/actions/install
114+
with:
115+
os: ${{ matrix.os }}
116+
repo-token: ${{ secrets.GITHUB_TOKEN }}
117+
118+
- name: Check if VERSION exists
119+
shell: bash
120+
id: check_version
121+
run: |
122+
if [ ! -z "${{ env.VERSION }}" ]; then
123+
echo "PRODUCTION=true" >> $GITHUB_ENV
124+
fi
125+
126+
- name: Build Plugin
127+
shell: bash
128+
run: task build
129+
env:
130+
OS: ${{ matrix.target }}
131+
ARCH: ${{ matrix.arch }}
132+
133+
- name: Rename Plugin artifact
134+
run: mv build/deweb-plugin${{ matrix.ext }} build/deweb-plugin_${{ matrix.target }}_${{ matrix.arch }}${{ matrix.ext }}
135+
136+
- name: Upload Plugin artifact
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: deweb-plugin_${{ matrix.target }}_${{ matrix.arch }}
140+
path: plugin/build/deweb-plugin_${{ matrix.target }}_${{ matrix.arch }}${{ matrix.ext }}

0 commit comments

Comments
 (0)