Skip to content

Commit

Permalink
Merge pull request #72 from Sudwest-Fryslan/fix-ci
Browse files Browse the repository at this point in the history
Fix ci
  • Loading branch information
DelanoWAF authored Aug 1, 2024
2 parents b577ea6 + 1ff4129 commit 89a761f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,36 @@ on:
jobs:
analyze-commits:
runs-on: ubuntu-latest
outputs:
version-next: ${{ steps.next-version.outputs.release-version }}
version-next-tag: ${{ steps.next-version.outputs.release-tag }}
version-next-type: ${{ steps.next-version.outputs.release-type }}
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: audit
allowed-endpoints: >
github.com:443
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #4.1.1

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20

- name: Install dependencies
run: yarn global add semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/exec @semantic-release/release-notes-generator @semantic-release/commit-analyzer conventional-changelog-conventionalcommits

- name: Get next version
id: next-version
run: semantic-release --dryRun
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Echo DOCKER_IMAGE_REPOSITORY
run: "echo DOCKER_IMAGE_REPOSITORY: '${{ vars.DOCKER_IMAGE_REPOSITORY }}'"
-
name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
-
name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 20.x
-
name: "Install plugin for semantic-release"
run: npm install @google/semantic-release-replace-plugin -D
-
name: Install dependencies
run: yarn global add semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/exec @semantic-release/release-notes-generator @semantic-release/commit-analyzer@10.0.1 conventional-changelog-conventionalcommits@6.1.0
-
name: Get next version
id: next-version
run: semantic-release --dryRun
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
release-tag: ${{ steps.next-version.outputs.release-tag }}
release-version: ${{ steps.next-version.outputs.release-version }}

docker:
uses: ./.github/workflows/docker-build-and-push-workflow.yml
Expand Down Expand Up @@ -84,10 +85,10 @@ jobs:
run: yarn global add semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/exec @semantic-release/release-notes-generator @semantic-release/commit-analyzer@10.0.1 conventional-changelog-conventionalcommits@6.1.0
-
name: Semantic Release
run: semantic-release
run: "semantic-release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Pull commit that holds the newly created tag - if applicable
run: git pull origin main
Expand Down
9 changes: 6 additions & 3 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{"type": "test", "release": "patch"},
{"type": "build", "release": "patch"},
{"type": "ci", "release": "patch"},
{"type": "chore", "release": patch}
{"type": "chore", "release": "patch"}
],
"parserOpts": {
"noteKeywords": [
Expand All @@ -40,6 +40,9 @@
"BREAKING"
]
},
"overrides": {
"conventional-changelog-conventionalcommits": ">= 8.0.0"
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
},
Expand All @@ -62,7 +65,7 @@
],
[
"@semantic-release/exec", {
"verifyReleaseCmd": "echo \"release-tag=v${nextRelease.version}\" >> $GITHUB_OUTPUT; echo \"release-version=${nextRelease.version}\" >> $GITHUB_OUTPUT; echo \"release-type=${nextRelease.type}\" >> $GITHUB_OUTPUT"
"verifyReleaseCmd": "echo '::set-output name=release-tag::v${nextRelease.version}'; echo '::set-output name=release-version::${nextRelease.version}'"
}
],
[
Expand All @@ -86,4 +89,4 @@
],
"@semantic-release/github"
]
}
}

0 comments on commit 89a761f

Please sign in to comment.