Loading files
name: Set up environment
description: Sets up a number of environment variables that are useful for publishing
runs:
using: "composite"
steps:
- name: Export Repo URL
shell: bash
run: echo "REPO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Export Branch Name
shell: bash
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Set default for env.NEW_TAG
shell: bash
run: echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV
- name: Check if publishing branch
shell: bash
run: |
if [[ "$BRANCH_NAME" == "main" || "$BRANCH_NAME" == "dev" || "$BRANCH_NAME" == version* ]]; then
echo "PUBLISHING_BRANCH=1" >> $GITHUB_ENV
fi
- name: Check for new version
if: ${{ github.event_name == 'push' && env.PUBLISHING_BRANCH == '1' }}
shell: bash
run: |
python3 ./.github/scripts/generate_tag.py
- name: Publish
if: ${{ github.event_name == 'push' && env.PUBLISHING_BRANCH == '1' && env.NEW_TAG != 'NO_NEW_TAG' }}
shell: bash
run: |
echo "PUBLISH=1" >> $GITHUB_ENV
f3aa9354aThis file is pinned to the selected release. Download the original to open it in your design tool.