summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-11-23 20:02:31 -0500
committerLex Neva <github.com@lexneva.name>2020-01-29 01:29:49 -0500
commit2f814d36002fffa907a9efdb86e41efb227627f6 (patch)
tree2dd9b51b7196388286607130f195a78353717d08
parent6b72f59daafefe06b785b86f415127657da68950 (diff)
try automatic releases action
-rw-r--r--.github/workflows/build.yml37
1 files changed, 28 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8477a545..e514b27d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,5 +1,10 @@
name: Build
-on: []
+on:
+ push:
+ branches-ignore:
+ - master
+ tags:
+ - "v*"
jobs:
windows:
runs-on: windows-latest
@@ -43,14 +48,28 @@ jobs:
with:
name: inkstitch-windows
path: artifacts
- - name: create/update dev release
-# if: not tagged v1.2.3
+ - name: determine release info
shell: bash
run: |
- branch="${GITHUB_REF#refs/heads/}"
- tag="dev-build-$(echo $branch | tr / -)"
- git tag -f $tag
- git push -f "https://git:${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}}@github.com/inkstitch/inkstitch.git" $tag
+ if [[ "${GITHUB_REF}" =~ ^v[0-9.]+$ ]]; then
+ echo "::set-env name=release_tag::${GITHUB_REF}"
+ echo "::set-env name=prerelease::false"
+ echo "::set-env name=title::${GITHUB_REF}"
+ else
+ branch="${GITHUB_REF#refs/heads/}"
+ tag="dev-build-$(echo $branch | tr / -)"
+ echo "::set-env name=release_tag::${tag}"
+ echo "::set-env name=prerelease::true"
+ echo "::set-env name=title::development build of $branch"
+ fi
+ - name: create/update release
+ uses: "marvinpinto/action-automatic-releases@v0.2.0"
+ with:
+ repo_token: "${{secrets.GITHUB_TOKEN}}"
+ automatic_release_tag: "${{env.release_tag}}"
+ prerelease: "${{env.prerelease}}"
+ title: "${{env.title}}"
+ files: |
+ artifacts/*.zip
- gem install dpl
- dpl --provider=releases --api-key=${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}} --file=artifacts/*.zip --file_glob --overwrite --tag_name=$tag --prerelease --name="development build of $branch" --body="Automatic development build of $branch ($GITHUB_COMMIT) built on $(date +'%F %T %Z')."
+