Skip to content

Chore: update action to source env #31

Chore: update action to source env

Chore: update action to source env #31

Workflow file for this run

name: release
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
with:
submodules: "true"
- run: git fetch --prune --unshallow
- name: setup dependencies
uses: actions/setup-go@v2
- name: Determine Release Type
id: release_type
run: |
if [[ "${{ github.ref }}" == *"-rc"* ]]; then
echo "Setting up for a release candidate"
echo "HOMEBREW_APP_NAME=rc-chatgpt-tui" >> $GITHUB_ENV
else
echo "Setting up for a stable release"
echo "HOMEBREW_APP_NAME=chatgpt-tui" >> $GITHUB_ENV
fi
env:
GITHUB_REF: ${{ github.ref }}
- name: release dry run
run: |
make release-dry-run
- name: setup release environment
run: |-
echo 'HOMEBREW_APP_NAME=${{env.HOMEBREW_APP_NAME}} GITHUB_TOKEN=${{secrets.PUBLISHER_TOKEN}}' > .release-env
- name: release publish
run: |
make release