mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-08 17:20:47 +00:00
change release workflow
This commit is contained in:
parent
6f86bc76f9
commit
60863b5464
2 changed files with 43 additions and 16 deletions
34
.github/workflows/empty-changelog.yaml
vendored
Normal file
34
.github/workflows/empty-changelog.yaml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: Empty CHANGELOG.md
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
empty-changelog:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.repository.default_branch }}
|
||||||
|
|
||||||
|
- name: Empty CHANGELOG.md
|
||||||
|
run: |
|
||||||
|
git config --global user.email "action@github.com"
|
||||||
|
git config --global user.name "github-actions"
|
||||||
|
|
||||||
|
if [ -s CHANGELOG.md ]; then
|
||||||
|
echo "Comitting emptied CHANGELOG.md"
|
||||||
|
else
|
||||||
|
echo "CHANGELOG.md is already empty. skipping comitting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm CHANGELOG.md
|
||||||
|
touch CHANGELOG.md
|
||||||
|
|
||||||
|
git add CHANGELOG.md
|
||||||
|
git commit -m "Empty CHANGELOG.md"
|
||||||
|
git push
|
||||||
25
.github/workflows/release.yaml
vendored
25
.github/workflows/release.yaml
vendored
|
|
@ -19,7 +19,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
# Make sure the actual branch is checked out when running on pull requests
|
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
|
|
@ -35,34 +34,28 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DRIBBBLISH_VERSION: ${{ github.event.inputs.version }}
|
DRIBBBLISH_VERSION: ${{ github.event.inputs.version }}
|
||||||
|
|
||||||
- name: Install Zip
|
|
||||||
uses: montudor/action-zip@v1
|
|
||||||
|
|
||||||
- name: Zip Release
|
- name: Zip Release
|
||||||
run: zip -r DribbblishDynamic_v${{ github.event.inputs.version }}.zip *
|
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Read & Reset CHANGELOG.md
|
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "action@github.com"
|
sudo apt-get install zip
|
||||||
git config --global user.name "actions-user"
|
zip -r DribbblishDynamic_v${{ github.event.inputs.version }}.zip *
|
||||||
|
mv DribbblishDynamic_v${{ github.event.inputs.version }}.zip ..
|
||||||
|
|
||||||
|
- name: Read CHANGELOG.md
|
||||||
|
run: |
|
||||||
|
[ -s CHANGELOG.md ] && CHANGELOG=$(< CHANGELOG.md) || CHANGELOG="CHANGELOG=*Empty.*"
|
||||||
|
|
||||||
CHANGELOG=$(< CHANGELOG.md)
|
|
||||||
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
||||||
echo "$CHANGELOG" >> $GITHUB_ENV
|
echo "$CHANGELOG" >> $GITHUB_ENV
|
||||||
echo "EOF" >> $GITHUB_ENV
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
|
||||||
echo "" > CHANGELOG.md
|
|
||||||
git add CHANGELOG.md
|
|
||||||
git commit -m "Reset CHANGELOG.md"
|
|
||||||
git push
|
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
fail_on_unmatched_files : true
|
fail_on_unmatched_files : true
|
||||||
files: dist/DribbblishDynamic_v${{ github.event.inputs.version }}.zip
|
files: DribbblishDynamic_v${{ github.event.inputs.version }}.zip
|
||||||
tag_name: ${{ github.event.inputs.version }}
|
tag_name: ${{ github.event.inputs.version }}
|
||||||
|
draft: true
|
||||||
name: v${{ github.event.inputs.version }}
|
name: v${{ github.event.inputs.version }}
|
||||||
body: |
|
body: |
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue