Skip to content

Commit

Permalink
CI: Download and parse version file
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Sep 28, 2024
1 parent 7ae43b3 commit 3ce072b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/milestones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
- name: Get VERSION file
run: |
gh api \
-H "Accept: application/vnd.github.raw" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/{owner}/{repo}/contents/include/VERSION" > include/VERSION
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
- name: Get milestone title from VERSION file
id: version
run: |
version=$(head -n 3 include/VERSION | xargs | sed 's/ /./g' | sed 's/\(RC\|dev\)//g')
echo "version=$version" >> "${GITHUB_OUTPUT}"
- run: echo $VERSION
env:
VERSION: ${{ steps.version.outputs.version }}

# - uses: actions/github-script@v7
# with:
# script: |
Expand Down

0 comments on commit 3ce072b

Please sign in to comment.