Skip to content

Commit

Permalink
Add auto build/release CI [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmassay committed Apr 4, 2024
1 parent 2389834 commit 6201e4e
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Release Plugin

on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
branches:
- master
env:
PLUGIN_NAME: "BibiReader"

jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Get tag name
if: startswith( github.ref, 'refs/tags/')
id: get_tag_name
run: |
echo ::set-output name=TAGNAME::${GITHUB_REF/refs\/tags\//}
echo "GITHUB_TAGNAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Build Plugin
run: python ./buildplugin

- name: Upload Artifact
if: "contains(github.event.head_commit.message, '[deploy]')"
uses: actions/upload-artifact@v4
with:
name: unzip_me
path: ./*.zip
retention-days: 3

- name: Create Release
if: startswith( github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: $PLUGIN_NAME ${{ steps.get_tag_name.outputs.TAGNAME }} Released
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
artifacts: './*.zip'

0 comments on commit 6201e4e

Please sign in to comment.