2023-03-23 15:38:37 +00:00
|
|
|
name: Release
|
2021-05-10 14:11:01 +00:00
|
|
|
|
2023-10-11 09:30:54 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
release_type:
|
|
|
|
description: 'Final release or beta'
|
|
|
|
required: true
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- final
|
|
|
|
- beta
|
2021-05-10 14:11:01 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-03-23 11:56:11 +00:00
|
|
|
release:
|
2023-03-23 15:38:37 +00:00
|
|
|
if: github.repository == 'moodlemobile/moodleapp'
|
2021-05-10 14:11:01 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-10-11 09:30:54 +00:00
|
|
|
env:
|
|
|
|
RELEASE_TYPE: ${{ github.event.inputs.release_type || 'final' }}
|
2021-05-10 14:11:01 +00:00
|
|
|
|
|
|
|
steps:
|
2024-01-19 10:43:39 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-05-10 14:11:01 +00:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
2024-01-19 10:43:39 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2023-05-30 09:21:37 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Install npm packages
|
|
|
|
run: npm ci --no-audit
|
2023-03-23 10:23:58 +00:00
|
|
|
- name: Create release tags
|
2021-05-10 14:11:01 +00:00
|
|
|
env:
|
|
|
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
2023-10-11 09:30:54 +00:00
|
|
|
run: ./.github/scripts/release.sh $RELEASE_TYPE
|