Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: semantic-release actions #5057

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: "node"
Loading