-
Notifications
You must be signed in to change notification settings - Fork 13
57 lines (48 loc) · 1.42 KB
/
manual-release.yml
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
name: Manual Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release Version'
required: true
default: '0.0.0'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Release Version
run: echo "VERSION=${{ github.event.inputs.releaseVersion }}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: true
prerelease: ${{ contains(env.VERSION, '-beta') }}
- name: Build
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
yarn install
composer prefix-dependencies
composer install --no-dev
yarn build:js
- name: Sync to Temporary Directory
run: |
mkdir temp_dir
rsync -av --prune-empty-dirs --exclude-from='.distignore' ./ temp_dir/
- name: Compress and Upload ZIP
run: |
cd temp_dir
zip -r ../woocommerce-pos.zip .
cd ..
gh release upload v${{ env.VERSION }} woocommerce-pos.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}