From 71e172279b264ec343b14f7224a934a967897b23 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Thu, 1 Aug 2024 17:51:50 +0200 Subject: [PATCH] add alpha release action Signed-off-by: dartcafe --- .github/workflows/publish_alpha.yml | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/publish_alpha.yml diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_alpha.yml new file mode 100644 index 000000000..5cb88c600 --- /dev/null +++ b/.github/workflows/publish_alpha.yml @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: 2022 Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later +name: Publish pre-release + +on: + push: + tags: + - v*-alpha* + +jobs: + checkout: + runs-on: ubuntu-latest + name: Alpha release + steps: + - uses: actions/checkout@v4 + - name: Check correct app version + id: appinfo + uses: ./.github/actions/get-polls-version + + - name: Setup node + if: success() + uses: ./.github/actions/setup-node + + - name: Setup composer and PHP + if: success() + uses: ./.github/actions/setup-composer + with: + mode: production + php-tools: composer + + - name: build + run: npm run build --if-present + + - name: Make appstore package ${{ steps.appinfo.outputs.app-version }} + if: success() + run: make package + + - name: rename packages to polls-${{ steps.appinfo.outputs.app-version }} + if: success() + run: mv build/artifacts/appstore/polls.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz + + - name: create zip archive from sources + if: success() + run: | + pushd build/source + zip -r ../artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip * + popd + + - name: Extract release notes + if: success() + id: extract-release-notes + uses: ffurrer2/extract-release-notes@v1 + + - name: Publish pre-release ${{ steps.appinfo.outputs.app-version }} + if: success() + uses: softprops/action-gh-release@v1 + with: + body: "# Changelog for the upcomming release (preview)\n ${{ steps.extract-release-notes.outputs.release_notes }} " + prerelease: true + draft: false + generate_release_notes: true + files: | + build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz + build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip