-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.19 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Release New Version
on: workflow_dispatch
jobs:
check_authorization:
name: Check authorization to release new version
runs-on: ubuntu-latest
outputs:
isAuthorized: ${{ steps.check-auth.outputs.is_authorized }}
steps:
- name: check-auth
id: check-auth
run: echo "is_authorized=${{ contains(secrets.DEPLOYMENT_AUTHORIZED_USERS, github.triggering_actor) }}" >> $GITHUB_OUTPUT
release:
name: Release new semantic version
needs: check_authorization
if: needs.check_authorization.outputs.isAuthorized == 'true'
runs-on: ubuntu-latest
outputs:
didRelease: ${{ steps.semver.outputs.new_release_published }}
newVersion: ${{ steps.semver.outputs.new_release_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: semantic-release
uses: cycjimmy/semantic-release-action@v3
id: semver
env:
GITHUB_TOKEN: ${{ secrets.LIBREBOT_ACCESS_TOKEN }}
GIT_AUTHOR_NAME: libretexts-bot
GIT_AUTHOR_EMAIL: dev@libretexts.org
GIT_COMMITTER_NAME: libretexts-bot
GIT_COMMITTER_EMAIL: dev@libretexts.org