Skip to content

Commit

Permalink
Update release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mizaki authored Sep 18, 2024
1 parent cddaa60 commit c0c09fe
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: CI

on:
pull_request:
push:
branches:
- '**'
tags:
- "[0-9]+.[0-9]+.[0-9]+*"

jobs:
build-and-publish:
Expand Down Expand Up @@ -32,15 +31,20 @@ jobs:
- name: Build and install wheel
run: |
tox run -m build
python -m pip install dist/*.whl -t build/plugin
cd build/plugin
mkdir ../../dist/plugin
zip -r ../../dist/plugin/${{ github.event.repository.name }}.zip *
python -m pip install dist/*.whl
- name: Get release name
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* # github is dumb
echo "release_name=$(git tag -l --format "%(refname:strip=2): %(contents:lines=1)" ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: "${{ env.release_name }}"
draft: false
files: |
dist/*.whl

0 comments on commit c0c09fe

Please sign in to comment.