Skip to content

Commit

Permalink
Create manual-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Feb 27, 2024
1 parent cac9aa5 commit 8b5cabd
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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: false
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 }}

0 comments on commit 8b5cabd

Please sign in to comment.