Release 8.8.3 #52
Workflow file for this run
This file contains hidden or 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
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]+' | |
- '[a-zA-Z]+-[0-9]+.[0-9]+.[0-9]+' | |
name: Build & Release | |
env: | |
DOCS_ARTIFACT_TEMPLATE: dxfeed-net-api-%VERSION%-docs | |
RELEASE_PREFIX: "dxFeed .Net API " | |
C_API_REPO: "https://github.com/dxfeed/dxfeed-c-api.git" | |
C_API_RELEASE_TEMPLATE: "https://github.com/dxFeed/dxfeed-c-api/releases/download/#VERSION#/dxfeed-c-api-#VERSION#-windows.zip" | |
jobs: | |
# --------------------------- BUILD DOCUMENTATION | |
build_docs: | |
runs-on: ubuntu-latest | |
name: build documentation | |
steps: | |
- uses: actions/checkout@master | |
- name: Set env | |
run: | | |
echo RELEASE_VERSION=$(echo ${GITHUB_REF:10}) >> $GITHUB_ENV | |
echo ARTIFACT=$(echo ${DOCS_ARTIFACT_TEMPLATE} | sed "s/%VERSION%/$(echo ${GITHUB_REF:10})/g" ) >> $GITHUB_ENV | |
- name: Check env | |
run: | | |
echo Artifact: ${{ env.ARTIFACT }} | |
echo Release : ${{ env.RELEASE_VERSION }} | |
- name: Build documentation | |
uses: ./.github/actions/doxygen | |
id: build-docs | |
with: | |
artifact: ${{ env.ARTIFACT }} | |
release: ${{ env.RELEASE_VERSION }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT }}.zip | |
path: artifact/${{ env.ARTIFACT }}.zip | |
# --------------------------- PUBLISH RELEASE | |
publish_release: | |
runs-on: ubuntu-latest | |
name: publish release | |
needs: [build_docs] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set env | |
run: | | |
echo RELEASE_VERSION=$(echo ${GITHUB_REF:10}) >> $GITHUB_ENV | |
echo DOC_ARTIFACT=$(echo ${DOCS_ARTIFACT_TEMPLATE} | sed "s/%VERSION%/$(echo ${GITHUB_REF:10})/g").zip >> $GITHUB_ENV | |
- name: Check env | |
run: | | |
echo "Release : ${{ env.RELEASE_VERSION }}" | |
echo "Documentation Artifact: ${DOC_ARTIFACT}" | |
- name: Download documentation artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.DOC_ARTIFACT }} | |
path: downloads/ | |
- name: Get release notes | |
uses: ./.github/actions/notes | |
id: notes | |
with: | |
file: ReleaseNotes.txt | |
- name: Print release notes | |
run: | | |
echo "=== Release notes =============" | |
echo '${{ steps.notes.outputs.data }}' | |
- name: Publish release | |
uses: ./.github/actions/publish | |
with: | |
args: downloads/ | |
draft_regex: '[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]+' | |
prerelease_regex: '[a-zA-Z]+-[0-9]+.[0-9]+.[0-9]+' | |
notes: '${{ steps.notes.outputs.data }}' | |
env: | |
RELEASE_PREFIX: ${{ env.RELEASE_PREFIX }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# --------------------------- PUBLISH DOCUMENTATION TO AWS S3 | |
publish_documentation: | |
# run this job for "normal" releases only (tag does not contain '-') | |
if: ${{ !contains( github.ref, '-' ) }} | |
runs-on: ubuntu-latest | |
name: publish documentation | |
needs: [build_docs] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set env | |
run: | | |
echo RELEASE_VERSION=$(echo ${GITHUB_REF:10}) >> $GITHUB_ENV | |
echo DOC_ARTIFACT=$(echo ${DOCS_ARTIFACT_TEMPLATE} | sed "s/%VERSION%/$(echo ${GITHUB_REF:10})/g").zip >> $GITHUB_ENV | |
echo DOC_DIR=$(echo ${DOCS_ARTIFACT_TEMPLATE} | sed "s/%VERSION%/$(echo ${GITHUB_REF:10})/g") >> $GITHUB_ENV | |
- name: Check env | |
run: | | |
echo "Release : ${{ env.RELEASE_VERSION }}" | |
echo "Documentation Artifact: ${DOC_ARTIFACT}" | |
- name: Download documentation artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.DOC_ARTIFACT }} | |
path: downloads/ | |
- name: Prepare documentation | |
run: | | |
cd downloads | |
unzip ${{ env.DOC_ARTIFACT }} | |
rm ${{ env.DOC_ARTIFACT }} | |
- name: Check documentation | |
run: | | |
cd downloads/${{ env.DOC_DIR }} | |
ls -lah | |
- name: Upload documentation to S3 | |
uses: ./.github/actions/s3-upload | |
id: upload-docs-to-s3 | |
env: | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_OUTPUT: text | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_S3_PATH: ${{ secrets.AWS_S3_PATH }} | |
SOURCE_DIR: ./downloads/${{ env.DOC_DIR }} |