Оптимизирован release workflow.
This commit is contained in:
parent
cd288b44b1
commit
5712fb98ba
@ -11,6 +11,8 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
version: ${{ steps.meta.outputs.VERSION }}
|
||||||
|
changes: ${{ steps.meta.outputs.CHANGES }}
|
||||||
artifact_amd64: ${{ steps.build-amd.outputs.ARTIFACT }}
|
artifact_amd64: ${{ steps.build-amd.outputs.ARTIFACT }}
|
||||||
artifact_arm64: ${{ steps.build-arm.outputs.ARTIFACT }}
|
artifact_arm64: ${{ steps.build-arm.outputs.ARTIFACT }}
|
||||||
steps:
|
steps:
|
||||||
@ -20,6 +22,14 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: get meta-data
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
echo "VERSION=$(make version)" >> $GITHUB_OUTPUT
|
||||||
|
echo 'CHANGES<<EOF' >> $GITHUB_OUTPUT
|
||||||
|
gawk -f scripts/changes.awk -v version=$(make version-number) CHANGELOG.md >> $GITHUB_OUTPUT
|
||||||
|
echo EOF >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: set-up go
|
- name: set-up go
|
||||||
uses: https://gitea.com/actions/setup-go@v3
|
uses: https://gitea.com/actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
@ -93,37 +103,19 @@ jobs:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
version: ${{ steps.meta.outputs.VERSION }}
|
|
||||||
changes: ${{ steps.meta.outputs.CHANGES }}
|
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
|
- build_windows
|
||||||
steps:
|
steps:
|
||||||
- name: check-out repository code
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- name: get meta-data
|
|
||||||
id: meta
|
|
||||||
run: |
|
|
||||||
echo "VERSION=$(make version)" >> $GITHUB_OUTPUT
|
|
||||||
echo 'CHANGES<<EOF' >> $GITHUB_OUTPUT
|
|
||||||
gawk -f scripts/changes.awk -v version=$(make version-number) CHANGELOG.md >> $GITHUB_OUTPUT
|
|
||||||
echo EOF >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: download debian amd64 package
|
- name: download debian amd64 package
|
||||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
uses: https://gitea.com/actions/download-artifact@v3-node20
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.build.outputs.artifact_amd64 }}
|
name: ${{ needs.build.outputs.artifact_amd64 }}
|
||||||
path: out/
|
|
||||||
|
|
||||||
- name: download debian ard64 package
|
- name: download debian arm64 package
|
||||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
uses: https://gitea.com/actions/download-artifact@v3-node20
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.build.outputs.artifact_arm64 }}
|
name: ${{ needs.build.outputs.artifact_arm64 }}
|
||||||
path: out/
|
|
||||||
|
|
||||||
- name: deploy debian packages
|
- name: deploy debian packages
|
||||||
env:
|
env:
|
||||||
@ -144,42 +136,21 @@ jobs:
|
|||||||
Port $SSH_PORT
|
Port $SSH_PORT
|
||||||
StrictHostKeyChecking no
|
StrictHostKeyChecking no
|
||||||
END
|
END
|
||||||
cat ~/.ssh/config
|
find -O1 . -name '*.changes' -exec dput mousesoft \{\} \;
|
||||||
make deploy
|
|
||||||
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
- build_windows
|
|
||||||
- deploy
|
|
||||||
steps:
|
|
||||||
- name: download debian amd64 package
|
|
||||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
|
||||||
with:
|
|
||||||
name: ${{ needs.build.outputs.artifact_amd64 }}
|
|
||||||
path: out/
|
|
||||||
|
|
||||||
- name: download debian ard64 package
|
|
||||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
|
||||||
with:
|
|
||||||
name: ${{ needs.build.outputs.artifact_arm64 }}
|
|
||||||
path: out/
|
|
||||||
|
|
||||||
- name: download windows package
|
- name: download windows package
|
||||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
uses: https://gitea.com/actions/download-artifact@v3-node20
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.build_windows.outputs.artifact }}
|
name: ${{ needs.build_windows.outputs.artifact }}
|
||||||
path: out/
|
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
title: "MouseSoft DrawIO-Export ${{ needs.deploy.outputs.version }}"
|
title: "MouseSoft DrawIO-Export ${{ needs.build.outputs.version }}"
|
||||||
body: "${{ needs.deploy.outputs.changes }}"
|
body: "${{ needs.build.outputs.changes }}"
|
||||||
files: |
|
files: |
|
||||||
out/*.deb
|
*.deb
|
||||||
out/*.msi
|
*.msi
|
||||||
sha256sum: true
|
sha256sum: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
draft: true
|
draft: true
|
||||||
|
Loading…
Reference in New Issue
Block a user