Skip to content

Release

Release #22

Workflow file for this run

name: 'Release'
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
build:
name: 'Build'
uses: ./.github/workflows/build.yaml
test:
name: 'Test'
needs: build
uses: ./.github/workflows/test.yaml
publish-api-docs:
name: 'Publish API Docs'
needs: test
runs-on: ubuntu-latest
steps:
- name: 'Checkout Wiki'
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
- name: 'Fetch API Docs'
uses: actions/download-artifact@v3
with:
name: api_docs.md
- name: 'Setup API Docs'
run: mv api_docs.md API-Reference-v1.md
- name: 'Commit and Push Wiki Changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Publish API docs"
git push "https://:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.wiki.git"
create-release:
name: 'Create Release'
needs: publish-api-docs
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Create Release'
run: gh release create $RELEASE_VERSION --title $RELEASE_VERSION --notes "#### Release notes:"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RELEASE_VERSION: ${{github.ref_name}}