Skip to content

Commit

Permalink
feat: semantic-release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
emuvente committed Nov 1, 2023
1 parent ca8753d commit d5554bf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name: create-release
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Environment to release to (staging or production)'
options:
- staging
- production
pre_release:
description: "Should this be a pre-release for staging?"
required: true
type: boolean
default: true
pre_release_branch:
description: "Branch to use for pre-release"
required: false
type: string
default: "main"

jobs:
create-release:
Expand All @@ -29,13 +32,9 @@ jobs:
path: .github/
- name: create-release
id: release
uses: ./.github/actions/create-release
uses: ./.github/actions/start-semantic-release
env:
GITHUB_PAT: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
with:
environment: ${{ github.event.inputs.environment }}
write_to_file: "true"
- name: update-package-file
uses: ./.github/actions/semantic-package-json-update
with:
new_version: ${{ steps.release.outputs.tag }}
pre_release: "${{ github.event.inputs.pre_release }}"
pre_release_branch: ${{ github.event.inputs.pre_release_branch }}
30 changes: 30 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Semantic Release

on:
push:
branches:
- staging
- production

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: checkout-repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
- name: checkout-actions
uses: actions/checkout@v4
with:
repository: kiva/github-actions
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
path: .github/
- name: semantic-release
uses: ./.github/actions/semantic-release
env:
GITHUB_PAT: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
with:
config: "base"

0 comments on commit d5554bf

Please sign in to comment.