From 1bd944b8a5cbe7f339a1cd1865520727f35e2291 Mon Sep 17 00:00:00 2001 From: Jake Champion Date: Mon, 16 Mar 2020 23:25:06 +0000 Subject: [PATCH] Add origami-version GitHub Action When this is merged, we can have automated releases by using the release-type labels "major"/"minor"/"patch" on a pull-request before merging the pull-request. --- .../workflows/automatic-tag-and-release.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/automatic-tag-and-release.yml diff --git a/.github/workflows/automatic-tag-and-release.yml b/.github/workflows/automatic-tag-and-release.yml new file mode 100644 index 000000000..c338372da --- /dev/null +++ b/.github/workflows/automatic-tag-and-release.yml @@ -0,0 +1,20 @@ +on: + pull_request: + types: [closed] # Merged pull-requests count as closed pull-requests. + +jobs: + create-new-version: + runs-on: ubuntu-latest + name: Create new version/tag + steps: + - uses: actions/checkout@v2 + if: github.event.pull_request.merged # Only run on merged pull-requests + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} # Checkout the merged commit + fetch-depth: 0 + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* # Get all tags from the origin + - uses: Financial-Times/origami-version@v1 + name: Create new version/tag + if: github.event.pull_request.merged # Only run on merged pull-requests + with: + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file