Skip to content

Update Workflow

Update Workflow #8

Workflow file for this run

name: Build and Release DOCXImport plugin
on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
branches:
- master
env:
PLUGIN_NAME: "DOCXImport"
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get tag name
if: startswith( github.ref, 'refs/tags/')
id: get_tag_name
run: echo "TAGNAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 buildplugin
flake8 .
- name: Build Plugin
run: |
python buildplugin
- name: Upload Artifact
if: "contains(github.event.head_commit.message, '[deploy]')"
uses: actions/upload-artifact@v3
with:
name: docximport-artifact
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: ${{ env.PLUGIN_NAME }} ${{ steps.get_tag_name.outputs.TAGNAME }}
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
artifacts: './*.zip'