Skip to content

Commit

Permalink
Fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
suecharo committed May 15, 2023
1 parent efddff6 commit 4aa6470
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ jobs:
- name: Load release version
id: load_release_version
run: |
echo "VERSION=$(python3 ./nii_dg/module_info.py)" >> $GITHUB_ENV
- name: Print release version
run: |
echo ${{ env.VERSION }}
echo "version=$(python3 ./nii_dg/module_info.py)" >> $GITHUB_OUTPUT
generate_and_push_context:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -52,27 +49,29 @@ jobs:
schema_name=$(basename $schema .yml)
python3 ./schema/scripts/generate_docs.py ./nii_dg/schema/${schema_name}.yml ./schema/docs/${schema_name}.md
done
- name: Commit and push to main
- name: Setup git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and push to main
run: |
git add ./schema/context/*.jsonld
git add ./schema/docs/*.md
git diff --quiet && git diff --staged --quiet ||
git commit -m "Update context and docs"
git push origin main
- name: Commit and push to develop
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout develop
git checkout -B develop
git merge main
git push origin develop
git checkout main
build_wheel:
runs-on: ubuntu-latest
needs: [load_release_version, generate_and_push_context]
env:
VERSION: ${{ steps.load_release_version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -104,6 +103,8 @@ jobs:
deploy_ghcr:
runs-on: ubuntu-latest
needs: [load_release_version, generate_and_push_context]
env:
VERSION: ${{ steps.load_release_version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -131,6 +132,8 @@ jobs:
create_release:
runs-on: ubuntu-latest
needs: [load_release_version, generate_and_push_context]
env:
VERSION: ${{ steps.load_release_version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 4aa6470

Please sign in to comment.