Skip to content

Commit

Permalink
Update build-and-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
atas committed Oct 15, 2024
1 parent a6af528 commit e67c04b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
permissions:
contents: write
needs: build_and_test
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -121,7 +121,7 @@ jobs:
latest_release=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest)
current_version=$(echo "$latest_release" | jq -r .tag_name)
current_version=${current_version#v} # Remove the 'v' from the version if present
current_version=${current_version%-dev} # Remove '-dev' suffix if present
current_version=${current_version%-[a-zA-Z0-9]*} # Remove '-[a-zA-Z0-9]*' suffix if present
IFS='.' read -r major minor patch <<< "$current_version"
# Increment the patch version
Expand All @@ -131,15 +131,15 @@ jobs:
echo "next_version=$next_version"
echo "next_version=$next_version" >> $GITHUB_ENV
- name: Create GitHub Release
run: |
mv swpserver.tar.gz swpserver-$next_version.tar.gz
COMMIT_MSG=$(git log -1 --pretty=%B)
gh release create "v$next_version-dev" swpserver-$next_version.tar.gz\
--title "Release v$next_version-dev" \
--notes "$COMMIT_MSG"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create GitHub Release
# run: |
# mv swpserver.tar.gz swpserver-$next_version.tar.gz
# COMMIT_MSG=$(git log -1 --pretty=%B)
# gh release create "v$next_version-dev" swpserver-$next_version.tar.gz\
# --title "Release v$next_version-dev" \
# --notes "$COMMIT_MSG"
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


deploy:
Expand Down

0 comments on commit e67c04b

Please sign in to comment.