From b934adf9ba271503b1d7321c551a710a176ee006 Mon Sep 17 00:00:00 2001 From: Aaron Batilo <54044698+abatilo-isp@users.noreply.github.com> Date: Tue, 25 Aug 2020 10:01:51 -0700 Subject: [PATCH] ci: Setup versioning for releases (#5) * ci: Setup versioning for releases These changes will let us version the repo so that as we start putting more and more actions into this repository that will ultimately be re-used by other repos (like any helmfile or terraform actions), it'll be great to be able to version these so that we don't run into risk of breaking other consuming repos. * Correct file path * Move releaserc file Co-authored-by: Aaron --- .github/workflows/lint-pr.yml | 15 +++++++++++++++ .github/workflows/release.yml | 15 +++++++++++++++ .releaserc | 8 ++++++++ 3 files changed, 38 insertions(+) create mode 100644 .github/workflows/lint-pr.yml create mode 100644 .github/workflows/release.yml create mode 100644 .releaserc diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 0000000..59b45f0 --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,15 @@ +name: "Lint PR" +on: + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v1.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..68560c8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,15 @@ +name: Release +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Generate release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..7bf05ec --- /dev/null +++ b/.releaserc @@ -0,0 +1,8 @@ +{ + "branches": ["main"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github" + ] +}