Skip to content

Commit

Permalink
fix: correct ci environment workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Nov 14, 2023
1 parent da599db commit 5772a3b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- synchronize
- reopened

permissions:
pull-requests: write

jobs:
compliance:
uses: TMCB-SPACE/.github/.github/workflows/compliance.yml@main
1 change: 1 addition & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- edited
- synchronize
- reopened
workflow_call:

jobs:
development:
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,22 @@ on:
- beta
- next

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

jobs:
setup:
name: Set environment variables
runs-on: ubuntu-latest
outputs:
DEPLOY_ENVIRONMENT: ${{ steps.env.outputs.DEPLOY_ENVIRONMENT }}
steps:
- name: "☁️ compute environment variables"
id: env
run: |
echo "DEPLOY_ENVIRONMENT=$([[ ${{ github.ref_name }} == 'main' ]] && echo 'production' || echo ${{ github.ref_name }})" >> $GITHUB_OUTPUT
test:
name: Test and lint
uses: ./.github/workflows/development.yml
Expand Down Expand Up @@ -57,10 +72,13 @@ jobs:

release:
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/${{ env.RELEASE_TAG }}
name: ${{ needs.setup.outputs.DEPLOY_ENVIRONMENT }}
url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.semantic-release.outputs.release-tag }}
outputs:
release-tag: ${{ steps.semantic-release.outputs.release-tag }}
name: Semantic release
needs:
- setup
- test
- docker
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5772a3b

Please sign in to comment.