Skip to content

Commit

Permalink
Merge pull request #55 from Fgruntjes/semantic-release
Browse files Browse the repository at this point in the history
Semantic release
  • Loading branch information
Fgruntjes authored Feb 2, 2023
2 parents 74ceb50 + a294d63 commit 63c857c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 17 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy release

on:
release:
types: [ published ]

jobs:
deploy_slug:
runs-on: ubuntu-latest
steps:
- uses: booxmedialtd/ws-action-parse-semver@v1
id: semver
with:
input_string: ${{ github.ref }}
version_extractor_regex: '\/v(.*)$'
- id: environment
run: echo "var=${{ steps.semver.outputs.prerelease || "production" }}" >> $GITHUB_OUTPUT
outputs:
environment: ${{ steps.environment.outputs.var }}
tag: v${{ steps.semver.outputs.fullversion }}

build:
needs: [ deploy_slug ]
uses: ./.github/workflows/build.yaml
secrets: inherit
with:
environment: ${{ needs.deploy_slug.outputs.environment }}
tag: ${{ needs.deploy_slug.outputs.tag }}

deploy:
needs: [ deploy_slug, build ]
uses: ./.github/workflows/deploy.yaml
secrets: inherit
concurrency: ${{ needs.deploy_slug.outputs.environment }}
with:
environment: ${{ needs.deploy_slug.outputs.environment }}
tag: ${{ needs.deploy_slug.outputs.tag }}
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
persist-credentials: false
- uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
working_directory: "./.github"
semantic_version: 20
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions .github/workflows/test_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,29 @@ jobs:
needs: [deploy_slug, build]
uses: ./.github/workflows/deploy.yaml
secrets: inherit
concurrency: ${{ needs.deploy_slug.outputs.environment }}
concurrency:
group: ${{ needs.deploy_slug.outputs.environment }}
cancel-in-progress: true
with:
environment: ${{ needs.deploy_slug.outputs.environment }}
tag: ${{ needs.deploy_slug.outputs.tag }}

test:
runs-on: ubuntu-latest
needs: [deploy_slug, deploy]
concurrency: ${{ needs.deploy_slug.outputs.environment }}
concurrency:
group: ${{ needs.deploy_slug.outputs.environment }}
cancel-in-progress: true
steps:
- run: echo "Do some integration tests on this tmp environment"

delete:
needs: [deploy_slug, test]
uses: ./.github/workflows/delete.yaml
secrets: inherit
concurrency: ${{ needs.deploy_slug.outputs.environment }}
concurrency:
group: ${{ needs.deploy_slug.outputs.environment }}
cancel-in-progress: true
if: ${{ always() }}
with:
environment: ${{ needs.deploy_slug.outputs.environment }}
15 changes: 3 additions & 12 deletions .github/workflows/test_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ jobs:
with:
dotnet-version: 7.0
- run: cd ${{ matrix.project }} && npm ci
- run: cd ${{ matrix.project }} && npm run test -- --reporters="default" --reporters="jest-md-dashboard"
- uses: marocchino/sticky-pull-request-comment@v2
if: always()
with:
path: ${{ matrix.project }}/test-dashboard.md
header: unit_typescript
- run: cd ${{ matrix.project }} && npm run test -- --reporters="default"

test_unit_dotnet:
runs-on: ubuntu-latest
Expand All @@ -59,9 +54,5 @@ jobs:
- run: dotnet restore ${{ matrix.project }}
- run: dotnet build --no-restore ${{ matrix.project }}
- run: docker-compose -f App.Lib.Tests/docker-compose.yaml up -d
- run: dotnet test --no-restore --no-build --logger "liquid.md;LogFileName=${{github.workspace}}/${{env.file_name}};Title=${{env.title}};" ${{ matrix.project }}
- uses: marocchino/sticky-pull-request-comment@v2
if: always()
with:
path: ${{github.workspace}}/${{env.file_name}}
header: unit_dotnet
- run: dotnet test --no-restore --no-build ${{ matrix.project }}

0 comments on commit 63c857c

Please sign in to comment.