-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automate release files as github workflow
automate check release version keep in sync - git tag - ./sendto_silhouette.py --version - sendto_silhouette.inx: about_version
- Loading branch information
Showing
4 changed files
with
61 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
name: Create Release Package | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 🐧 Install Inkscape | ||
run: | | ||
sudo add-apt-repository ppa:inkscape.dev/stable -y # inkscape 1.2 from https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable | ||
sudo apt-get update | ||
sudo apt-get -y install inkscape | ||
sudo apt-get -y install checkinstall libxml-xpath-perl # xpath | ||
inkscape --version | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Branch name | ||
id: branch_name | ||
run: | | ||
echo ::set-output name=TAG_VERSION::$( echo ${GITHUB_REF#refs/tags/} | sed -e 's/^v//' ) | ||
echo ::set-output name=SOURCE_VERSION::$( python ./sendto_silhouette.py --version ) | ||
echo ::set-output name=INX_VERSION::$( xpath -q -e '//*[@name="about_version"]/text()' sendto_silhouette.inx | sed -e 's/^version //i' ) | ||
- name: Version Check | ||
env: | ||
TAG_VERSION: ${{ steps.branch_name.outputs.TAG_VERSION }} | ||
SOURCE_VERSION: ${{ steps.branch_name.outputs.SOURCE_VERSION }} | ||
INX_VERSION: ${{ steps.branch_name.outputs.INX_VERSION }} | ||
run: | | ||
echo "::notice::tag version: $TAG_VERSION" | ||
echo "::notice::source version: $SOURCE_VERSION" | ||
echo "::notice::inx version: $INX_VERSION" | ||
[ "$SOURCE_VERSION" == "$INX_VERSION" ] || ( echo "::error::Error: source version and .inx version differ" && exit 1 ) | ||
[ "$SOURCE_VERSION" == "$TAG_VERSION" ] || ( echo "::error::Error: source version and git tag differ" && exit 1 ) | ||
- name: Build Release Package | ||
run: | | ||
make dist | ||
# - name: Upload .deb Package | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: inkscape-silhouette_${{ steps.branch_name.outputs.SOURCE_SOURCE_VERSION }}-1_all.deb | ||
# path: distribute/out/inkscape-silhouette_${{ steps.branch_name.outputs.SOURCE_SOURCE_VERSION }}-1_all.deb | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: | | ||
distribute/out/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,7 +172,7 @@ Always use the least amount of blade possible. | |
<page name='about' _gui-text='About'> | ||
<label>inkscape-silhouette extension from https://github.com/fablabnbg/inkscape-silhouette by Jürgen Weigert [[email protected]] and contributors</label> | ||
<!-- Keep in sync with sendto_silhouette.py line 94 __version__ = ... --> | ||
<label>Version 1.25</label> | ||
<label name='about_version'>Version 1.25</label> | ||
</page> | ||
</param> | ||
|
||
|