Update docusauras config file (#723) #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Github Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
# Permission can be added at job level or workflow level | |
permissions: | |
contents: write # This is required for actions/checkout and create release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release: | |
name: Github Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Github Release | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
if (!${{ toJson(github.ref_name) }}) { | |
core.setFailed("RELEASE_TAG is not defined.") | |
return; | |
} | |
try { | |
const response = await github.rest.repos.createRelease({ | |
name: ${{ toJson(github.ref_name) }}, | |
tag_name: ${{ toJson(github.ref_name) }}, | |
draft: false, | |
generate_release_notes: true, | |
owner: context.repo.owner, | |
prerelease: false, | |
repo: context.repo.repo, | |
}); | |
core.exportVariable('RELEASE_ID', response.data.id); | |
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url); | |
} catch (error) { | |
core.setFailed(error.message); | |
} |