[Workflow] Generate Ruby Types from Workflow (#5) #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: [master, main] | |
tags: ["*"] | |
paths-ignore: ['**.md'] | |
workflow_dispatch: #allows manual trigger | |
concurrency: production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Get next release version (dry run) | |
id: taggerDryRun | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DRY_RUN: true | |
- name: echo new tag | |
run: | | |
export NEXT_VERSION=${{ steps.taggerDryRun.outputs.new_tag }} | |
echo "The next tag version will be: $NEXT_VERSION" | |
- name: echo tag | |
run: | | |
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}" | |
- name: Compile | |
run: sbt clean stage | |
- name: Generate Ruby Types | |
run: ./standalone --withLanguageFrontend RUBYSRC | |
- name: Checksum | |
run: sha512sum builtin_types/ruby_builtin_types.zip > builtin_types/ruby_builtin_types.zip.sha512 | |
- name: Rename | |
run: | | |
mv builtin_types/ruby_builtin_types.zip rubysrc_builtin_types.zip | |
mv builtin_types/ruby_builtin_types.zip.sha512 rubysrc_builtin_types.zip.sha512 | |
- name: Show SHA512 | |
run: cat rubysrc_builtin_types.zip.sha512 | |
- name: Set next release version | |
id: taggerFinal | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }} | |
files: | | |
rubysrc_builtin_types.zip | |
rubysrc_builtin_types.zip.sha512 |