Skip to content

Commit

Permalink
update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Nov 24, 2023
1 parent 3552f85 commit 4252917
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ jobs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:
- name: Set env CHANNEL
shell: bash
run: |
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
if [[ ${GIT_BRANCH} == "main" ]]; then
echo "PUBLISH_CHANNEL=default" >> "$GITHUB_ENV"
else
echo "PUBLISH_CHANNEL=eap" >> "$GITHUB_ENV"
fi
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
Expand All @@ -39,7 +29,20 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Set env CHANNEL
shell: bash
run: |
raw=$(git branch -r --contains ${{ github.ref }})
GIT_BRANCH=${raw##*/}
if [[ ${GIT_BRANCH} == "main" ]]; then
echo "PUBLISH_CHANNEL=default" >> "$GITHUB_ENV"
echo "PUBLISH_EAP=0" >> "$GITHUB_ENV"
else
echo "PUBLISH_CHANNEL=eap" >> "$GITHUB_ENV"
echo "PUBLISH_EAP=1" >> "$GITHUB_ENV"
fi
echo "GIT_BRANCH=${GIT_BRANCH}" >> "$GITHUB_ENV"
- name: Download artifact
id: download-artifact
Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
PUBLISH_CHANNEL: ${{ env.PUBLISH_CHANNEL }}
PUBLISH_EAP: 1
PUBLISH_EAP: ${{ env.PUBLISH_EAP }}
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
Expand Down

0 comments on commit 4252917

Please sign in to comment.