set expanded strings #817
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
# Use the following for linting: https://rhysd.github.io/actionlint/ | |
name: Build and Release EOP on GitHub | |
on: [push] | |
permissions: | |
issues: write | |
pull-requests: write | |
contents: write | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
jobs: | |
# This job is used to build EOP | |
# It runs on every commit pushed to GitHub | |
build-eop: | |
runs-on: windows-2022 | |
# Steps | |
steps: | |
- name: "Checkout from latest commit: '${{ github.event.head_commit.message }}'" | |
uses: actions/checkout@v3 | |
- name: Build EOP | |
uses: ./.github/workflows/composite-actions/build-eop | |
with: | |
vsversion: "2022" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: M2TWEOP-latest-build | |
path: M2TWEOP.zip | |
# This job is used to update the online documentation | |
# It requires a commit message beginning with 'Docs' to run | |
update-docs: | |
runs-on: windows-2022 | |
if: "startsWith(github.event.head_commit.message, 'Docs:')" | |
steps: | |
- name: "Checkout from latest commit: '${{ github.event.head_commit.message }}'" | |
uses: actions/checkout@v3 | |
- name: Build EOP | |
uses: ./.github/workflows/composite-actions/build-eop | |
with: | |
vsversion: "2022" | |
- name: Update EOP Online Documentation | |
uses: ./.github/workflows/composite-actions/build-docs | |
with: | |
commit_message_string: 'commit: ${{ github.event.head_commit.message }}' | |
# This job is used to release EOP to GitHub and update the documentation | |
# It requires a commit message beginning with 'Release' to run | |
release-eop: | |
runs-on: windows-2022 | |
# If the latest commit message starts with 'Release', update docs and issue a release on GitHub | |
if: "startsWith(github.event.head_commit.message, 'Release:')" | |
steps: | |
- name: "Checkout from latest commit: '${{ github.event.head_commit.message }}'" | |
uses: actions/checkout@v3 | |
- name: Build EOP | |
uses: ./.github/workflows/composite-actions/build-eop | |
with: | |
vsversion: "2022" | |
- name: Read release version info from source | |
run: | | |
echo "EOP_VERSION=$(./getEOPVersionInfo.ps1 "./M2TWEOP Code/M2TWEOP Common/m2tweopConstData.h")" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
shell: powershell | |
- name: Output EOP_VERSION | |
run: | | |
echo "${Env:EOP_VERSION}" | |
# Update the documentation | |
- name: Update EOP Online Documentation | |
uses: ./.github/workflows/composite-actions/build-docs | |
with: | |
commit_message_string: "version: ${{ env.EOP_VERSION }}" | |
- name: Rename generated zip to match EOP_VERSION | |
run: | | |
cp "M2TWEOP.zip" "${{ env.EOP_VERSION }}.zip" | |
shell: bash | |
- name: Release new EOP version on GitHub - ${{ env.EOP_VERSION }} | |
uses: ncipollo/release-action@v1 | |
with: | |
name: "${{ env.EOP_VERSION }}" | |
tag: "${{ env.EOP_VERSION }}" | |
artifacts: "${{ env.EOP_VERSION }}.zip" | |
bodyFile: "./documentationGenerator/releaseInfo/releaseDescription.md" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: "master" | |
allowUpdates: true |