Skip to content

Commit

Permalink
Versionless Preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Akamig committed Sep 9, 2024
1 parent 160ca5f commit 4173010
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- release/*
- hotfix/*
- preview
- preview/*
tags: ["*"]

Expand All @@ -31,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}

environment:
name: ${{ startsWith(github.event.ref, 'refs/tags/') && 'main' || startsWith(github.event.ref, 'refs/heads/preview/') && 'preview' || 'internal' }}
name: ${{ startsWith(github.event.ref, 'refs/tags/') && 'main' || startsWith(github.event.ref, 'refs/heads/preview') && 'preview' || 'internal' }}

steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
then
sed "s/Please replace it/${{ secrets.APPLE_TEAM_ID }}/g" electron-builder.main.yml > temp2.txt
mv temp2.txt electron-builder.main.yml
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview/') }}" == true ]]
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview') }}" == true ]]
then
timestamp=$(date +%y%m%d%H%M%S)
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}')
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
sh ./scripts/release.sh main ${{ matrix.packCmd }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest.yml"
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest-mac.yml"
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview/') }}" == true ]]
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview') }}" == true ]]
then
sh ./scripts/release.sh preview ${{ matrix.packCmd }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest.yml"
Expand Down

0 comments on commit 4173010

Please sign in to comment.