Skip to content

Commit

Permalink
Updated conditional release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bottiger committed Jun 27, 2024
1 parent 9de4a57 commit ae18ed4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- main
tags:
- v*
#tags:
# - v*
workflow_dispatch:

permissions:
Expand All @@ -26,6 +26,7 @@ jobs:
VERSION=$(jq -r '.version' src/manifest.json)
echo "NAME=$NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "DO_RELEASE='false'" >> $GITHUB_ENV
- name: "Create Tag if Version Changed"
id: create_tag
Expand All @@ -38,6 +39,7 @@ jobs:
git tag v${{ env.VERSION }}
git push origin v${{ env.VERSION }}
echo "::set-output name=create_release::true"
echo "DO_RELEASE='true'" >> $GITHUB_ENV
fi
- name: "web-ext build"
Expand All @@ -57,7 +59,7 @@ jobs:
release:
runs-on: ubuntu-latest
needs: build # Ensure the build job completes first
if: ${{ needs.build.outputs.create_release == 'true' }}
if: needs.build.outputs.DO_RELEASE == 'true'
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
#if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down

0 comments on commit ae18ed4

Please sign in to comment.