commit
c7a7d081e3
2 changed files with 27 additions and 10 deletions
15
.github/workflows/build-main.yaml
vendored
15
.github/workflows/build-main.yaml
vendored
|
@ -8,14 +8,6 @@ name: build-main
|
|||
on:
|
||||
repository_dispatch:
|
||||
types: [release-main]
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- 'README.md'
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: main
|
||||
|
@ -27,7 +19,7 @@ jobs:
|
|||
steps:
|
||||
- uses: hmarr/debug-action@v2
|
||||
name: debug
|
||||
- name: get current branch as it may not be default branch;
|
||||
- name: get current branch as it may not be 'default branch;
|
||||
id: branch
|
||||
run: |
|
||||
branch_arg="${{ github.event.client_payload.branch }}"
|
||||
|
@ -43,6 +35,9 @@ jobs:
|
|||
- name: Get date for artifacts
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
||||
- name: Get short SHA for artifacts
|
||||
id: sha
|
||||
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
|
@ -51,7 +46,7 @@ jobs:
|
|||
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
||||
echo "::set-output name=version::${{ github.event.client_payload.release_tag }}"
|
||||
else
|
||||
echo "::set-output name=version::${{ steps.date.outputs.date }}"
|
||||
echo "::set-output name=version::${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}"
|
||||
fi
|
||||
- name: Build World
|
||||
run: |
|
||||
|
|
22
.github/workflows/release-main.yaml
vendored
22
.github/workflows/release-main.yaml
vendored
|
@ -6,6 +6,17 @@
|
|||
|
||||
name: release-main
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '*.md'
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
- '.gitignore'
|
||||
- 'licenses/**'
|
||||
- 'tools/**'
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
|
@ -31,6 +42,16 @@ jobs:
|
|||
run: |
|
||||
echo "::set-output name=full_name::$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')"
|
||||
|
||||
- name: changes
|
||||
id: changes
|
||||
run: |
|
||||
prevrelcommit="$(git rev-list --tags --max-count=1)"
|
||||
release_notes="$(git log ${prevrelcommit}..HEAD --pretty=format:"* %h: %s")"
|
||||
release_notes="${release_notes//'%'/'%25'}"
|
||||
release_notes="${release_notes//$'\n'/'%0A'}"
|
||||
release_notes="${release_notes//$'\r'/'%0D'}"
|
||||
echo "::set-output name=changes::$(echo ${release_notes} | wc -l)"
|
||||
echo "::set-output name=release_notes::${release_notes}"
|
||||
- name: Get date for artifacts
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
||||
|
@ -46,5 +67,6 @@ jobs:
|
|||
{
|
||||
"branch" : "${{ env.BRANCH }}",
|
||||
"release_tag" : "${{steps.date.outputs.date}}",
|
||||
"release_notes" : ${{toJSON(steps.changes.outputs.release_notes)}}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue