mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
ci(ci-semver): add semver release for binaries
This commit is contained in:
parent
05589705dd
commit
1e2960f793
41
.github/workflows/build_release_bins.yml
vendored
41
.github/workflows/build_release_bins.yml
vendored
@ -2,7 +2,6 @@ name: Build and Release the OpenIris bin files
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "mdns-autodiscovery"
|
|
||||||
- "master"
|
- "master"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
@ -51,11 +50,11 @@ jobs:
|
|||||||
working-directory: ./ESP
|
working-directory: ./ESP
|
||||||
run: |
|
run: |
|
||||||
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
|
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
|
||||||
- name: Archive Version File
|
#- name: Archive Version File
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: version
|
# name: version
|
||||||
path: ./ESP/tools/version.txt
|
# path: ./ESP/tools/version.txt
|
||||||
- name: Archive Firmware name File
|
- name: Archive Firmware name File
|
||||||
# create an environment variable with the name of the firmware file by catting the firmware_name.txt file
|
# create an environment variable with the name of the firmware file by catting the firmware_name.txt file
|
||||||
run: |
|
run: |
|
||||||
@ -74,11 +73,27 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: release
|
path: release
|
||||||
- name: Release Firmware
|
- name: Checkout
|
||||||
uses: ncipollo/release-action@v1
|
uses: actions/checkout@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
with:
|
||||||
artifacts: release/*/*.bin
|
fetch-depth: 0
|
||||||
generateReleaseNotes: true
|
- name: Setup node
|
||||||
allowUpdates: true
|
uses: actions/setup-node@v3
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- run: npm install -g conventional-changelog-angular
|
||||||
|
- run: npm install -g semantic-release@v19.0.5
|
||||||
|
- run: npm install -g @semantic-release/exec
|
||||||
|
- run: npm install -g @semantic-release/git
|
||||||
|
- run: npm install -g @semantic-release/release-notes-generator
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: semantic-release
|
||||||
|
#uses: ncipollo/release-action@v1
|
||||||
|
#if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
#with:
|
||||||
|
# artifacts: release/*/*.bin
|
||||||
|
# generateReleaseNotes: true
|
||||||
|
# allowUpdates: true
|
||||||
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
67
.releaserc
Normal file
67
.releaserc
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"branches": [
|
||||||
|
"main",
|
||||||
|
"master"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"preset": "angular",
|
||||||
|
"releaseRules": [
|
||||||
|
{
|
||||||
|
"type": "docs",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"scope": "core-*",
|
||||||
|
"release": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"scope": "feat-*",
|
||||||
|
"release": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ci",
|
||||||
|
"scope": "ci-*",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": "no-release",
|
||||||
|
"release": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parserOpts": {
|
||||||
|
"noteKeywords": [
|
||||||
|
"BREAKING CHANGE",
|
||||||
|
"BREAKING CHANGES"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"prepareCmd": "sed -i 's/\"version\": \"[0-9\\.]*\",/\"version\": \"${nextRelease.version}\",/g' ./ESP/lib/library.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/github",
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"ESP/lib/library.json",
|
||||||
|
"ESP/.pio/build/**/*.bin"
|
||||||
|
],
|
||||||
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user