Skip to content

Commit

Permalink
fix: gha build release
Browse files Browse the repository at this point in the history
  • Loading branch information
leoparente committed Dec 16, 2024
1 parent 36602f0 commit 0eb89e8
Showing 1 changed file with 74 additions and 71 deletions.
145 changes: 74 additions & 71 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Orb Agent - release
on:
workflow_dispatch:
pull_request:
branches:
- develop
push:
branches: [ release ]
paths:
Expand Down Expand Up @@ -163,74 +166,74 @@ jobs:
build-args: |
GO_VERSION=${{ env.GO_VERSION }}
semantic-release:
name: Semantic release
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Write package.json
uses: DamianReeves/write-file-action@master
with:
path: ./package.json
write-mode: overwrite
contents: |
{
"name": "${{ env.APP_NAME }}",
"version": "1.0.0",
"devDependencies": {
"semantic-release-export-data": "^1.0.1",
"@semantic-release/changelog": "^6.0.3"
}
}
- name: Write .releaserc.json
uses: DamianReeves/write-file-action@master
with:
path: ./.releaserc.json
write-mode: overwrite
contents: |
{
"branches": "release",
"repositoryUrl": "https://github.com/netboxlabs/orb-agent",
"debug": "true",
"tagFormat": "/v${version}",
"plugins": [
["semantic-release-export-data"],
["@semantic-release/commit-analyzer", {
"releaseRules": [
{ "message": "*", "release": "patch"},
{ "message": "fix*", "release": "patch" },
{ "message": "feat*", "release": "minor" },
{ "message": "perf*", "release": "major" }
]
}],
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Semantic Versioning Changelog"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "release/**"
}
]
}
]
]
}
- name: setup semantic-release
run: npm i
- name: Release
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_OBSERVABILITY_RELEASE_WEBHOOK }}
run: npx semantic-release --debug
# semantic-release:
# name: Semantic release
# needs: build
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: "lts/*"
# - name: Write package.json
# uses: DamianReeves/write-file-action@master
# with:
# path: ./package.json
# write-mode: overwrite
# contents: |
# {
# "name": "${{ env.APP_NAME }}",
# "version": "1.0.0",
# "devDependencies": {
# "semantic-release-export-data": "^1.0.1",
# "@semantic-release/changelog": "^6.0.3"
# }
# }
# - name: Write .releaserc.json
# uses: DamianReeves/write-file-action@master
# with:
# path: ./.releaserc.json
# write-mode: overwrite
# contents: |
# {
# "branches": "release",
# "repositoryUrl": "https://github.com/netboxlabs/orb-agent",
# "debug": "true",
# "tagFormat": "/v${version}",
# "plugins": [
# ["semantic-release-export-data"],
# ["@semantic-release/commit-analyzer", {
# "releaseRules": [
# { "message": "*", "release": "patch"},
# { "message": "fix*", "release": "patch" },
# { "message": "feat*", "release": "minor" },
# { "message": "perf*", "release": "major" }
# ]
# }],
# "@semantic-release/release-notes-generator",
# [
# "@semantic-release/changelog",
# {
# "changelogFile": "CHANGELOG.md",
# "changelogTitle": "# Semantic Versioning Changelog"
# }
# ],
# [
# "@semantic-release/github",
# {
# "assets": [
# {
# "path": "release/**"
# }
# ]
# }
# ]
# ]
# }
# - name: setup semantic-release
# run: npm i
# - name: Release
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_OBSERVABILITY_RELEASE_WEBHOOK }}
# run: npx semantic-release --debug

0 comments on commit 0eb89e8

Please sign in to comment.