Skip to content

Commit

Permalink
Automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
sonologico committed Oct 13, 2022
1 parent b4e517b commit bdf8991
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on:
pull_request:
types: [ labeled ]
branches:
- master

jobs:
prepare-release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current version
shell: bash
run: |
CURRENT_VERSION=$(awk '/libraryVersion =/ { gsub("\"",""); print $3 }' client.go)
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: pusher/public_actions
path: .github/actions
- uses: ./.github/actions/prepare-version-bump
id: bump
with:
current_version: ${{ env.CURRENT_VERSION }}
- name: Push
shell: bash
run: |
sed -i '' 's/${{env.CURRENT_VERSION}}/${{steps.bump.outputs.new_version}}' client.go
git add client.go CHANGELOG.md
git commit -m "Bump to version ${{ steps.bump.outputs.new_version }}"
git push

0 comments on commit bdf8991

Please sign in to comment.