Skip to content

Commit

Permalink
fix: trigger ci with improved workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alinalihassan committed Apr 22, 2023
1 parent cbcc7ca commit 0edea4b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:

- name: Install Semantic Release Dependencies
run: |
npm install -g @semantic-release/changelog @semantic-release/git
npm install -g @semantic-release/changelog @semantic-release/git @google/semantic-release-replace-plugin
- name: Download Artifact
uses: actions/download-artifact@v3
Expand All @@ -126,24 +126,6 @@ jobs:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@google/semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update vcpkg.json version
if: steps.semantic.outputs.new_release_published == 'true'
uses: sergeysova/jq-action@v2
with:
cmd: 'jq ".version=\"${{ steps.semantic.outputs.new_release_version }}\"" vcpkg.json > vcpkg-updated.json'

- name: Move updated vcpkg.json
if: steps.semantic.outputs.new_release_published == 'true'
run: mv vcpkg-updated.json vcpkg.json

- name: Commit and push changes
if: steps.semantic.outputs.new_release_published == 'true'
run: |
git config user.name "GitHub"
git config user.email "[email protected]"
git add vcpkg.json
git commit -m "Update version in vcpkg.json to ${{ steps.semantic.outputs.new_release_version }}"
git push
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 36 additions & 6 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
{
"branches": ["main"],
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/github", {
"assets": [
{"path": "Lesma-*.tar.gz"}
]
}],
[
"@semantic-release/github",
{
"assets": [
{
"path": "Lesma-*.tar.gz"
}
]
}
],
"@semantic-release/changelog",
[
"@google/semantic-release-replace-plugin",
{
"replacements": [
{
"files": [
"vcpkg.json"
],
"from": "\"version\": \".*\"",
"to": "\"version\": \"${nextRelease.version}\"",
"results": [
{
"file": "vcpkg.json",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
}
]
}
],
"@semantic-release/git"
]
}

0 comments on commit 0edea4b

Please sign in to comment.