Skip to content

Release

Release #46

Workflow file for this run

name: Release
on:
workflow_dispatch:
workflow_run:
workflows:
- Up version
types:
- completed
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
jobs:
run:
name: release
runs-on: ubuntu-latest
if: ${{ github.actor == 'robot-charts' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 20
cache: 'npm'
- name: get latest tag
id: tag
run: |
git fetch --tags
TAG=$(git tag -l "v*" | sort -V | tail -n 1)
VERSION=$(echo "${TAG}" | sed 's|^v||')
echo "tag: ${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: checkout latest tag
run: git checkout ${{ steps.tag.outputs.tag }}
- name: build
run: |
npm ci
npm run build:prepare
npm run build
npm run build:fix
npm run build:api
- uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # 0.7.6
with:
type: zip
filename: datalens-docs-${{ steps.tag.outputs.version }}.zip
directory: build
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: datalens-docs-${{ steps.tag.outputs.version }}
path: datalens-docs-${{ steps.tag.outputs.version }}.zip
- uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
artifacts: build/datalens-docs-${{ steps.tag.outputs.version }}.zip
name: ${{ steps.tag.outputs.tag }}
tag: ${{ steps.tag.outputs.tag }}