Skip to content

Commit

Permalink
Fix workflow to update version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rukmal committed Sep 28, 2022
1 parent 1e6283c commit 0c3fe51
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version number from tag
id: vars
# See: https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Test output vars
env:
RELEASE_VERSION: ${{ steps.meta.vars.outputs.tag }}
run: echo $RELEASE_VERSION
- uses: actions/setup-python@v4
with:
python-version: "3.10"
# See: https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Install tom-cli to modify toml file
run: |
python -m pip install toml cli
- name: Update version in Ballerina.toml files
run: |
toml get --toml-path api/Ballerina.toml package.version >> $OLD_VERSION
echo "Old package version: ${OLD_VERSION}"
echo "New package veresion: ${{ env.RELEASE_VERSION }}"
# - name: Update API version in package files
# uses: ciiiii/toml-editor@1.0.0
# with:
Expand Down

0 comments on commit 0c3fe51

Please sign in to comment.