Merge pull request #3 from onemedical/INFRA-5855 #4
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
# Create a new GitHub tag and release based on a value in version file. | |
--- | |
name: 🏷 Tag and Release | |
on: | |
push: | |
paths: | |
- version | |
branches: | |
- main | |
jobs: | |
tag-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Check out code | |
uses: actions/checkout@v3 | |
- name: 🏷 Create a tag | |
id: create-tag | |
uses: butlerlogic/action-autotag@stable | |
with: | |
strategy: regex | |
root: "version" | |
regex_pattern: "(\\d+\\.\\d+\\.\\d+)" | |
tag_prefix: "v" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: 🦄 Create a release | |
uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
tag: ${{ steps.create-tag.outputs.tagname }} | |
token: ${{ secrets.GITHUB_TOKEN }} |