Skip to content

Commit

Permalink
add alpha release action
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <[email protected]>
  • Loading branch information
dartcafe committed Aug 1, 2024
1 parent 838e89e commit 71e1722
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 71e1722

Please sign in to comment.