Skip to content

Commit

Permalink
Change version test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaskov committed Jun 26, 2024
1 parent 4a1b880 commit 23b145d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/change_version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

echo "Change type: ${CHANGE_TYPE}"

original_version_str="$(cat ${GITHUB_WORKSPACE}/Cargo.toml | grep "version = ")"
version_number="$(echo ${original_version_str} | cut -d "\"" -f2)"

Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
app-id: ${{ vars.FAIR_MATH_PUBLISHER_ID }}
private-key: ${{ secrets.FAIR_MATH_PUBLISHER_PRIVATE_KEY }}

- run: |
echo "Change type: $CHANGE_TYPE"
env:
CHANGE_TYPE: ${{ inputs.change_type }}
- name: Checkout sources
uses: actions/checkout@v4
with:
Expand All @@ -45,14 +40,16 @@ jobs:
run: |
chmod +x ${GITHUB_WORKSPACE}/.github/change_version.sh
bash ${GITHUB_WORKSPACE}/.github/change_version.sh
- name: Pushing Cargo.toml changes to master
run: |
git config --local user.name 'github-actions'
git config --local user.email 'github-actions@github.com'
git commit -am "Automated version change in Cargo.toml [skip actions]"
git push origin master
- run: cargo publish --no-verify --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
CHANGE_TYPE: ${{ inputs.change_type }}

# - name: Pushing Cargo.toml changes to master
# run: |
# git config --local user.name 'github-actions'
# git config --local user.email 'github-actions@github.com'
# git commit -am "Automated version change in Cargo.toml [skip actions]"
# git push origin master

# - run: cargo publish --no-verify --token ${CRATES_TOKEN}
# env:
# CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

0 comments on commit 23b145d

Please sign in to comment.