Skip to content

Preparing 1.0.0 release #29

Preparing 1.0.0 release

Preparing 1.0.0 release #29

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
release:
env:
CSW_VERSION: "6.0.0" # Change before releasing (before tagging repo)
ESW_VERSION: "v1.0.0"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: coursier/setup-action@v1.2.0
with:
jvm: temurin:1.21
apps: sbt sbtn
- uses: coursier/cache-action@v6
- uses: actions/setup-node@v4.2.0
with:
node-version: "22.14.0"
registry-url: "https://registry.npmjs.org"
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
#strip `v` prefix
strip_v: true
# This env variable is used when we do Docs Publish
- name: Set JITPACK_VERSION environment variable
run: echo "JITPACK_VERSION=${{steps.tag.outputs.tag}}" >> $GITHUB_ENV
- name: Install
run: npm ci
- name: Build
run: |
sbtn scalafmtCheck
sbtn clean
sbt -Dprod.publish=true makeSite
npm run build
- name: Tests
run: npm run test:ci
- name: Build - Example App
working-directory: ./example
run: |
npm ci
npm run build
- name: Selenium Test
run: sbt -Dprod.publish=true -DgenerateStoryReport=true -DRTM_PATH=./RTM clean test
- name: Generate RTM
if: always()
continue-on-error: true
run: |
sh rtm.sh
- name: Upload RTM
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: RTM
path: ./RTM
- name: Upload Coverage
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: Coverage
path: ./coverage
- name: NPM Publish
run: |
npm version v1.0.0 --allow-same-version --no-git-tag-version
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create rtm zip
uses: thedoctor0/zip-release@master
with:
filename: '/tmp/RTM.zip'
path: ./RTM
- name: Create coverage zip
uses: thedoctor0/zip-release@master
with:
filename: '/tmp/coverage.zip'
path: ./coverage
- name: Upload release artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/tmp/RTM.zip
/tmp/coverage.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Docs Publish
run: |
echo 'echo $RELEASE_TOKEN' > /tmp/.git-askpass
chmod +x /tmp/.git-askpass
git config --global user.email "actions@github.com"
git config --global user.name "Github Action"
sbt -Dprod.publish=true clean makeSite ghpagesPushSite
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GIT_ASKPASS: /tmp/.git-askpass
- name: Notify slack
if: always()
continue-on-error: true
uses: kpritam/slack-job-status-action@v1
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: ci-release