File tree 2 files changed +33
-4
lines changed
2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ permissions :
8
+ contents : write
9
+
10
+ jobs :
11
+ Test :
12
+ name : Make zip package
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+
17
+ - name : Zip plugin package
18
+ run : make package
19
+
20
+ - name : Upload release asset
21
+ env :
22
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
+ ASSET_NAME : ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
24
+ run : |
25
+ gh api --method POST \
26
+ -H "Accept: application/vnd.github+json" \
27
+ -H "X-GitHub-Api-Version: 2022-11-28" \
28
+ https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${{ env.ASSET_NAME }} \
29
+ -f file='@dist/artifact-HEAD.zip'
Original file line number Diff line number Diff line change 1
- PLUGIN_NAME = mojxml_plugin
1
+ PACKAGE_NAME = mojxml_plugin
2
2
3
3
# Use this tag for packaging
4
4
VERSION = HEAD
@@ -16,15 +16,15 @@ init: ## Startup project
16
16
poetry install
17
17
18
18
deploy : # # Deploy to QGIS
19
- rsync -av --delete ${PLUGIN_NAME } $(QGIS_USER ) /python/plugins/
19
+ rsync -av --delete ${PACKAGE_NAME } $(QGIS_USER ) /python/plugins/
20
20
21
21
package : # # Build zip package
22
22
mkdir -p dist
23
- git archive -o dist/${PLUGIN_NAME} -${VERSION} .zip ${VERSION} ${PLUGIN_NAME }
23
+ git archive -o dist/artifact -${VERSION} .zip ${VERSION} ${PACKAGE_NAME }
24
24
25
25
update-deps : # # Update mojxml library
26
26
pip download mojxml --no-dependencies
27
27
wheel3 unpack mojxml-* -py3-none-any.whl
28
- rsync -r --delete mojxml-* /mojxml ${PLUGIN_NAME } /
28
+ rsync -r --delete mojxml-* /mojxml ${PACKAGE_NAME } /
29
29
rm -rf mojxml-* /
30
30
rm -rf mojxml-* .whl
You can’t perform that action at this time.
0 commit comments