Skip to content

Merge pull request #1533 from ral-facilities/renovate/eslint-plugin-t… #545

Merge pull request #1533 from ral-facilities/renovate/eslint-plugin-t…

Merge pull request #1533 from ral-facilities/renovate/eslint-plugin-t… #545

Workflow file for this run

name: Release Build
on:
push:
branches:
- main
- develop
tags:
- '*'
jobs:
build:
name: Release Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable
- name: Build
run: yarn build
- name: Determine tag name
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]
then
echo TAG_NAME=snapshot >> $GITHUB_ENV
elif [ "${{ github.ref }}" = "refs/heads/develop" ]
then
echo TAG_NAME=snapshot-develop >> $GITHUB_ENV
else
echo TAG_NAME=`basename ${{ github.ref }}` >> $GITHUB_ENV
fi
- name: Create tarball
run: |
mv dist scigateway-$TAG_NAME
tar -czf scigateway-$TAG_NAME.tar.gz scigateway-$TAG_NAME
- name: Update snapshot tag
uses: richardsimko/update-tag@aab2434e9a5040687874aa39d1c6377ec0cb0d94 # v1
with:
tag_name: ${{ env.TAG_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Create/update release
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ./scigateway-${{ env.TAG_NAME }}.tar.gz
name: ${{ env.TAG_NAME }}
tag_name: ${{ env.TAG_NAME }}
prerelease: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
draft: false
generate_release_notes: true