Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Gieling <github@dartcafe.de>2022-06-05 11:48:36 +0300
committerGitHub <noreply@github.com>2022-06-05 11:48:36 +0300
commit21009e6d96d9a3bbd1460b6004472b17b2c976b7 (patch)
treeef66e3b0c538b6b776f1646bbe7b501e8ebd850f /.github
parent736ce0d93da5a98e89328f0ab0cd697687c559b9 (diff)
add action for automatic beta releases
Action publishes a new beta release as draft, if a new beta-tag (v*-beta*) is pushed
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/publish_beta.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/publish_beta.yml b/.github/workflows/publish_beta.yml
new file mode 100644
index 00000000..a3eeeb6e
--- /dev/null
+++ b/.github/workflows/publish_beta.yml
@@ -0,0 +1,62 @@
+name: Pubish beta release
+
+on:
+ push:
+ tags:
+ v*-beta*
+
+jobs:
+ checkout:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-versions: [14.x]
+ npm-versions: [7]
+ name: Beta release
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Get app version from appinfo/info.xml
+ id: appinfo
+ uses: mavrosxristoforos/get-xml-info@1.0
+ with:
+ xml-file: 'appinfo/info.xml'
+ xpath: '//info//version'
+ - name: Get tag name
+ id: gettag
+ run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
+ - name: Check correct app version
+ if: ${{ format('v{0}', steps.appinfo.outputs.info) != steps.gettag.outputs.VERSION }}
+ run: echo App version ${{ format('v{0}', steps.appinfo.outputs.info) }} is not equal to tag name ${{ steps.gettag.outputs.VERSION }} |
+ echo Cancelling workflow
+ exit 1
+
+ - name: Use node ${{ matrix.node-versions }}
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-versions }}
+ - name: Set up npm ${{ matrix.npm-versions }}
+ run: npm i -g npm@"${{ matrix.npm-versions }}"
+
+ - name: Make appstore package
+ run: make appstore
+
+ - name: rename package
+ run: mv build/artifacts/appstore/polls.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.info }}.tar.gz
+
+ - name: create zip archive from sources
+ run: |
+ pushd build/source
+ zip -r ../artifacts/appstore/polls-${{ steps.appinfo.outputs.info }}.zip *
+ popd
+
+ - name: Publish beta release
+ uses: softprops/action-gh-release@v1
+ with:
+ body_path: CHANGELOG.md
+ prerelease: true
+ draft: true
+ generate_release_notes: true
+ files: |
+ build/artifacts/appstore/polls-${{ steps.appinfo.outputs.info }}.tar.gz
+ build/artifacts/appstore/polls-${{ steps.appinfo.outputs.info }}.zip