Skip to content

Commit

Permalink
Add a GitHub action for the release.
Browse files Browse the repository at this point in the history
  • Loading branch information
yruslan committed Jan 24, 2024
1 parent fd79310 commit ea93ce0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
on:
workflow_dispatch:

jobs:
release-sbt:
runs-on: ubuntu-latest
name: Release Scala Artifacts

steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: coursier/cache-action@v5

- name: Setup Scala
uses: olafurpg/setup-scala@v15
with:
java-version: "adopt@1.8"

- name: Import GPG Key
run: echo "${{ secrets.SONATYPE_GPG_KEY }}" | base64 --decode > gpg-secret-key.asc
shell: bash

- name: Import GPG Public Key
run: gpg --import --batch gpg-secret-key.asc
shell: bash

- name: Run the release plugin
working-directory: ./pramen
run: sbt releaseNow

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Release version ${{ steps.release.outputs.version }}"
branch: release/${{ steps.release.outputs.version }}
title: "Release version ${{ steps.release.outputs.version }}"
body: "Automated release created by GitHub Action."
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ea93ce0

Please sign in to comment.