-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (36 loc) · 1.54 KB
/
create-release.yml
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
37
38
name: Create release
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
echo "REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
- name: Build Setup
uses: ./.github/actions/build-setup
- name: Bundle documentation theme
run: npm run bundle
- name: Change bundle name
run: mv build/ui-bundle.zip build/bonita-documentation-theme-${{ env.RELEASE_VERSION }}.zip
- name: Create release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "build/bonita-documentation-theme-${{ env.RELEASE_VERSION }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_TOKEN_DOC_TRIGGER_WF }}
repository: bonitasoft/bonita-documentation-site
event-type: new_theme_bundle
client-payload: '{"release": "${{ env.RELEASE_VERSION }}", "release_notes_url": "${{ env.REPO_URL }}/releases/tag/${{ env.RELEASE_VERSION }}", "bundle_file": "bonita-documentation-theme-${{ env.RELEASE_VERSION }}.zip", "bundle_url": "${{ env.REPO_URL }}/releases/download/${{ env.RELEASE_VERSION }}/bonita-documentation-theme-${{ env.RELEASE_VERSION }}.zip"}'