From cccf50a08ec2b2d756e7427503a5a4c890ac5448 Mon Sep 17 00:00:00 2001 From: Satinder Singh Date: Sat, 13 Jan 2024 16:55:54 -0800 Subject: [PATCH] feat: support releases with semantic versioning (#11) --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/semantic.yml | 12 ++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/semantic.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e4778bc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build + +on: + push: + branches: + - master + +jobs: + release-and-push: + name: Release And Push + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: -1 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Fetch Previous version + id: get-previous-tag + uses: actions-ecosystem/action-get-latest-tag@v1.6.0 + + - name: Release + run: yarn global add semantic-release@17.4.4 && semantic-release + env: + GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml new file mode 100644 index 0000000..e8ac80b --- /dev/null +++ b/.github/workflows/semantic.yml @@ -0,0 +1,12 @@ +# Always validate the PR title AND all the commits +titleAndCommits: true +# Require at least one commit to be valid +# this is only relevant when using commitsOnly: true or titleAndCommits: true, +# which validate all commits by default +anyCommit: true +# Allow use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") +# this is only relevant when using commitsOnly: true (or titleAndCommits: true) +allowMergeCommits: false +# Allow use of Revert commits (eg on github: "Revert "feat: ride unicorns"") +# this is only relevant when using commitsOnly: true (or titleAndCommits: true) +allowRevertCommits: false \ No newline at end of file