Skip to content

chore: attempt to fix create_release job #126

chore: attempt to fix create_release job

chore: attempt to fix create_release job #126

Workflow file for this run

# This is a basic workflow that is manually triggered
name: Create Release
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
push:
branches:
- gh-pages
tags:
- v*
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
release:
description: 'Release Version'
default: 'latest'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
get_release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
with:
ref: gh-pages
- name: Get Latest Release
id: get_latest_release
if: github.event.inputs.release == 'latest'
run: echo "release=$(git describe --abbrev=0 --always)" >> "$GITHUB_OUTPUT"
- name: Get Specified Release
id: get_specified_release
if: ${{ failure() }}
run: echo "release=${{ github.event.inputs.release }}" >> "$GITHUB_OUTPUT"
create_release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: get_release
env:
GH_TOKEN: ${{ github.token }}
RELEASE: ${{ needs.get_release.outputs.release }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
with:
ref: gh-pages
- name: Zip Release
uses: TheDoctor0/zip-release@0.7.0
with:
filename: ui-grid-${{ env.RELEASE }}.zip
path: ./release/${{ env.RELEASE }}/*
- name: Publish Release
run: gh release create v${{ env.RELEASE }} ./ui-grid-${{ env.RELEASE }}.zip