Skip to content

Commit

Permalink
ci: move to reusable workflows (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArwynFr authored Sep 12, 2023
1 parent 3c6a9ab commit 55d96ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 36 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: continuous integration
name: continuous deployment

on:
workflow_dispatch:
Expand All @@ -7,23 +7,11 @@ on:

jobs:
deployment:
runs-on: ubuntu-latest
steps:

- name: Checkout source files
uses: actions/checkout@v3

- name: Get new version
uses: arwynfr/actions-conventional-versioning/get-newVersion@v1
id: new-version

- name: Update module manifest version
shell: pwsh
run: Update-ModuleManifest -ModuleVersion ${{ steps.new-version.outputs.next-version }} ./StepSemVer/StepSemVer.psd1

- name: Publish module on PSGallery
shell: pwsh
run: Publish-Module -Path ./StepSemVer/ -NuGetApiKey ${{ secrets.PSGALLERY_APIKEY }}

- name: Tag new version on the repository
uses: arwynfr/actions-conventional-versioning@v1
uses: ArwynFr/ArwynFr/.github/workflows/pwsh-deployment.yaml@main
with:
manifest: ./StepSemVer/StepSemVer.psd1
source: ./StepSemVer/
tests: ./tests/Start-Tests.ps1
secrets:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
PSGALLERY_APIKEY: ${{ secrets.PSGALLERY_APIKEY }}
20 changes: 5 additions & 15 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,8 @@ on:

jobs:
integration:
runs-on: ubuntu-latest
steps:

- name: Checkout source files
uses: actions/checkout@v3

- name: Run unit tests
shell: pwsh
run: ./build/test.ps1

- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
uses: ArwynFr/ArwynFr/.github/workflows/pwsh-integration.yaml@main
with:
tests: ./tests/Start-Tests.ps1
secrets:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
File renamed without changes.

0 comments on commit 55d96ea

Please sign in to comment.