Skip to content

ci: change command from empty string #24

ci: change command from empty string

ci: change command from empty string #24

Workflow file for this run

name: Package
on:
pull_request:
pull_request_target:
types:
- closed
# push:
# branches:
# - main
jobs:
publish:
runs-on: ubuntu-latest
name: Hello Everyone
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Environment Variables
run: |
ref=$(git branch -r --contains ${{ github.sha }})
branch=${ref##*/}
echo -ne "GITHUB_BRANCH=$branch" >> $GITHUB_ENV
- name: test 1
run: |
echo ${{ github.event.pull_request.merged }}
echo ${{ github.event.pull_request.closed }}
echo ${{ github.event.push }}
echo ${{ github.head_ref }}
echo ${{ github.ref }}
echo ${{ github.ref_name }}
- name: test 2
run: |
echo ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && 'production' || 'staging' }}
echo ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && 'yarn package' || 'yarn package --tag beta' }}
- name: test 3
run: |
echo ${{ env.MATT_ENV }}
echo ${{ env.PACKAGE_TAG }}
echo ${{ env.GITHUB_BRANCH }}
env:
MATT_ENV: ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && 'production' || 'staging' }}
PACKAGE_TAG: ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && '' || '--tag beta' }}