diff --git a/.github/workflows/common-wf-noop.yml b/.github/workflows/common-wf-noop.yml new file mode 100644 index 0000000..a56a53a --- /dev/null +++ b/.github/workflows/common-wf-noop.yml @@ -0,0 +1,13 @@ + +name: Common Spot Verification Workflow + +on: + pull_request: + branches: [main] + +jobs: + call-verification-workflow: + runs-on: ubuntu-latest + steps: + - name: pr_structure_verification + run: 'exit 0' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index 7c6cfb3..0000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Create Release -on: - push: - branches: - - main - paths: - - './VERSION' - -jobs: - create-release: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - - name: Get the next version - id: next-version - run: echo "VALUE=$(cat VERSION)" >> $GITHUB_OUTPUT - - - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.next-version.outputs.VALUE }} - release_name: ${{ steps.next-version.outputs.VALUE }} - draft: false - commitish: main # use the latest commit on main branch (including the new version) - prerelease: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 526d2f2..97d4591 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,10 @@ jobs: - name: Get previous version id: previous-version - run: echo "VALUE=$(cat VERSION)" >> $GITHUB_OUTPUT + run: | + VERSION=`curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name'` + echo "got version $VERSION" + echo "VALUE=$VERSION" >> $GITHUB_OUTPUT - name: Get next release version id: next-version @@ -36,24 +39,13 @@ jobs: output=$(IFS=. ; echo "${array[*]}") echo "VALUE=$output" >> $GITHUB_OUTPUT - - name: Bump version - run: | - echo "${{ steps.next-version.outputs.VALUE }}" > VERSION - - - name: Generate version bump commit - run: | - git config user.name ${{ github.actor }} - git config user.email '${{ github.actor }}@users.noreply.github.com' - git commit -a -m "version bump ${{ steps.next-version.outputs.VALUE }}" + - name: Create GitHub Release + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} - title: '[skip ci] Release' - branch: release - delete-branch: true - labels: release_auto_version_bump + tag_name: ${{ steps.next-version.outputs.VALUE }} + release_name: ${{ steps.next-version.outputs.VALUE }} + draft: false + commitish: main # use the latest commit on main branch (including the new version) + prerelease: false diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index dcb0335..f000d2f 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -1,9 +1,8 @@ name: Update Changelog on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + release: + types: [published] jobs: update-changelog: