ci: remove checkout to master branch step

pull/1879/head
Ellet 11 months ago
parent f3c5057542
commit f2cdb30caf
  1. 9
      .github/workflows/publish.yml

@ -58,7 +58,7 @@ jobs:
version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/v\(.*\)$/\1/') version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/v\(.*\)$/\1/')
echo "VERSION=${version}" >> $GITHUB_OUTPUT echo "VERSION=${version}" >> $GITHUB_OUTPUT
- name: Validate version format - name: Validate extracted version format
run: | run: |
version=${{ steps.extract_version.outputs.VERSION }} version=${{ steps.extract_version.outputs.VERSION }}
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
@ -69,18 +69,15 @@ jobs:
- name: Update the version & CHANGELOG for all the packages - name: Update the version & CHANGELOG for all the packages
run: dart ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }} run: dart ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }}
- name: Checkout to the master branch
run: git checkout master
- name: Commit the changes of the updated version & CHANGELOG for all the packages - name: Commit the changes of the updated version & CHANGELOG for all the packages
id: auto-commit-action id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}" commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}"
- name: Run if changes have been detected - name: Check if changes have been done
if: steps.auto-commit-action.outputs.changes_detected == 'true' if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "The changes of the previous step has been done." run: echo "The changes of the previous step have been done"
- name: Check if package is ready for publishing - name: Check if package is ready for publishing
run: flutter pub publish --dry-run run: flutter pub publish --dry-run

Loading…
Cancel
Save