mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-25 04:52:10 +00:00
54 lines
No EOL
1.4 KiB
YAML
54 lines
No EOL
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version of Release (format: X.X.X)'
|
|
required: true
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Verify Input
|
|
run: |
|
|
[[ "${{ github.event.inputs.version }}" =~ ^[0-9]\.[0-9]\.[0-9]$ ]] && echo "Matches" && exit 0 || echo "Use versions like '1.2.3'" && exit 1
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
# Make sure the actual branch is checked out when running on pull requests
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14'
|
|
|
|
- name: Install Dependencies
|
|
run: npm install
|
|
|
|
- name: Build Webpack
|
|
run: npm run build
|
|
env:
|
|
DRIBBBLISH_VERSION: ${{ github.event.inputs.version }}
|
|
|
|
- name: Add Version File
|
|
run: echo "${{ github.event.inputs.version }}" > dist/VERSION
|
|
|
|
- name: Install zip
|
|
uses: montudor/action-zip@v1
|
|
|
|
- name: Zip Files
|
|
run: zip -r DribbblishDynamic_v${{ github.event.inputs.version }}.zip *
|
|
working-directory: dist
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: v${{ github.event.inputs.version }}
|
|
tag_name: ${{ github.event.inputs.version }}
|
|
files: dist/DribbblishDynamic_v${{ github.event.inputs.version }}.zip
|
|
fail_on_unmatched_files : true |