Merge pull request #1612 from saleweaver/dependabot/pip/master/boto3-… #106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
versioning: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
actions: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Increment version | |
uses: saleweaver/version_increment_action@v1 | |
with: | |
file_path: "sp_api/__version__.py" | |
version_key: "__version__" | |
- name: Create a new GitHub release | |
if: env.new_version != '' | |
uses: actions/create-release@v1 | |
with: | |
tag_name: "v${{ env.new_version }}" | |
release_name: "v${{ env.new_version }}" | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Trigger release workflow | |
if: env.new_version != '' | |
run: | | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
https://api.github.com/repos/${{ github.repository }}/dispatches \ | |
-d '{"event_type": "release_created", "client_payload": { "version": "${{ env.new_version }}" }}' |