Skip to content

Commit f7c86d8

Browse files
author
John Shaffer
committed
Create releases and upload plugin zip for v* tags
1 parent 7a25ea5 commit f7c86d8

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ on:
77
- develop
88
paths-ignore:
99
- '**.md'
10+
tags:
11+
- 'v*'
1012
pull_request:
1113
branches:
1214
- master
1315
- develop
1416
paths-ignore:
1517
- '**.md'
18+
1619
jobs:
1720
build:
1821
runs-on: ubuntu-latest
@@ -29,3 +32,30 @@ jobs:
2932
- name: Build plugin zip
3033
run: |
3134
nix develop -c bash tools/build_release.sh wp2static
35+
36+
- name: Upload artifact
37+
if: startsWith(github.ref, 'refs/tags/v')
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: Plugin
41+
path: plugin.zip
42+
43+
release:
44+
name: Create Release
45+
needs: build
46+
if: startsWith(github.ref, 'refs/tags/v')
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- name: Download artifact
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: Plugin
54+
path: .
55+
56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
files: plugin.zip
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)