Skip to content

Commit

Permalink
ci: add libraries release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Baliasnikov committed Oct 21, 2022
1 parent 7d86906 commit 80281ec
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/mercury.yml
Expand Up @@ -20,6 +20,9 @@ on:
- ".github/workflows/mercury.yml"
- "mercury/**"

env:
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}

defaults:
run:
shell: bash
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,49 @@
name: Release

on:
workflow_dispatch:
inputs:
release-component:
description: "Release component"
required: true
default: "mercury/prism-mediator"
release-branch:
description: "Branch to release from"
required: false
default: "main"

jobs:
release:
env:
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.release-branch }}
fetch-depth: 0
- name: Setup Java and Scala
uses: olafurpg/setup-scala@v13
with:
java-version: openjdk@1.11
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- uses: crazy-max/ghaction-import-gpg@v3
id: import_gpg
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
git-user-signingkey: true
git-commit-gpgsign: true
- name: Release
run: |
# Set required environment variables for semantic-release-git
export GIT_AUTHOR_EMAIL="${{ steps.import_gpg.outputs.email }}"
export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL}"
export GIT_AUTHOR_NAME="${{ steps.import_gpg.outputs.name }}"
export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME}"
# Install and run release process
cd ${{ github.event.inputs.release-component }}
npm install
npx semantic-release -e semantic-release-monorepo

0 comments on commit 80281ec

Please sign in to comment.