Skip to content

Commit

Permalink
Dry coded workflow example
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-enplore committed Jan 23, 2023
1 parent acb6308 commit 6b625f2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions workflow.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Write new version file
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Figure out the new version
id: new_version
uses: mathieudutour/[email protected]
with:
dry_run: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Write the version file
uses: simonblund/version-filer
with:
value: ${{ steps.new_version.outputs.new_tag }}
- name: GIT commit and push all changed files
env:
CI_COMMIT_MESSAGE: "version is now ${{ steps.new_version.outputs.new_tag }}"
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push

0 comments on commit 6b625f2

Please sign in to comment.