Compare commits
10
Commits
v3.0.2
...
08332b693c
No files matched your search
@@ -3,7 +3,7 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "**"
|
- "v*.*.*"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -46,9 +46,22 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OUTPUT: release-notes.md
|
OUTPUT: release-notes.md
|
||||||
|
|
||||||
|
- name: Read Release Token from the runner
|
||||||
|
run: |
|
||||||
|
if [[ -z "${RELEASE_TOKEN:-}" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "RELEASE_TOKEN<<__RELEASE_TOKEN__"
|
||||||
|
printf '%s\n' "$RELEASE_TOKEN"
|
||||||
|
echo "__RELEASE_TOKEN__"
|
||||||
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
# prerelease only when the tag contains "-alpha", "-beta" or "-rc". ex: v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0-rc.1
|
# prerelease only when the tag contains "-alpha", "-beta" or "-rc". ex: v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0-rc.1
|
||||||
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
|
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
|
||||||
body_path: release-notes.md
|
body_path: release-notes.md
|
||||||
|
token: ${{ env.RELEASE_TOKEN }} # Use this token if you want user author is 'github-actions' bot
|
||||||
|
draft: false
|
||||||
@@ -21,11 +21,23 @@ jobs:
|
|||||||
output-file: sbom.json
|
output-file: sbom.json
|
||||||
upload-artifact: false
|
upload-artifact: false
|
||||||
|
|
||||||
|
- name: Read API key from the runner
|
||||||
|
run: |
|
||||||
|
if [[ -z "${DT_API_KEY:-}" ]]; then
|
||||||
|
echo "DT_API_KEY is not set on this runner"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "DT_API_KEY<<__DT_API_KEY__"
|
||||||
|
printf '%s\n' "$DT_API_KEY"
|
||||||
|
echo "__DT_API_KEY__"
|
||||||
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Upload SBOM to Dependency-Track
|
- name: Upload SBOM to Dependency-Track
|
||||||
uses: DependencyTrack/gh-upload-sbom@v4
|
uses: DependencyTrack/gh-upload-sbom@v4
|
||||||
with:
|
with:
|
||||||
server-hostname: "${{ vars.DT_HOSTNAME }}"
|
server-hostname: "${{ vars.DT_HOSTNAME }}"
|
||||||
api-key: "${{ secrets.DT_API_KEY }}"
|
api-key: ${{ env.DT_API_KEY }}
|
||||||
project-name: "${{ github.repository }}"
|
project-name: "${{ github.repository }}"
|
||||||
project-version: "latest"
|
project-version: "latest"
|
||||||
bom-filename: "sbom.json"
|
bom-filename: "sbom.json"
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
name: Test workflow
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
echo "$GITHUB_TOKEN"
|
|
||||||
echo "$DT_API_KEY"
|
|
||||||
echo "$RELEASE_TOKEN"
|
|
||||||
echo "$SONAR_TOKEN"
|
|
||||||
+11
-4
@@ -25,11 +25,18 @@ body = """
|
|||||||
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }})
|
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }})
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- set authors = commits | map(attribute="author.name") | unique | sort %}
|
{#- Author names vary per machine (tienbh / Tien-BH / ...); the email local part matches the Gitea username. -#}
|
||||||
{% if authors | length > 0 %}
|
{%- set_global usernames = [] %}
|
||||||
|
{%- for commit in commits %}
|
||||||
|
{%- set username = commit.author.email | split(pat="@") | first | lower %}
|
||||||
|
{%- if username and username is not containing("bot") and username != "github-actions" and not username in usernames %}
|
||||||
|
{%- set_global usernames = usernames | concat(with=username) %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{% if usernames | length > 0 %}
|
||||||
## Contributors
|
## Contributors
|
||||||
{% for author in authors %}
|
{% for username in usernames | sort %}
|
||||||
* {{ author }}
|
* @{{ username }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if server and repository and version %}
|
{% if server and repository and version %}
|
||||||
|
|||||||
Reference in new issue
Block a user