Оптимизирован release workflow.
This commit is contained in:
parent
cd288b44b1
commit
5712fb98ba
@ -11,6 +11,8 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.meta.outputs.VERSION }}
|
||||
changes: ${{ steps.meta.outputs.CHANGES }}
|
||||
artifact_amd64: ${{ steps.build-amd.outputs.ARTIFACT }}
|
||||
artifact_arm64: ${{ steps.build-arm.outputs.ARTIFACT }}
|
||||
steps:
|
||||
@ -20,6 +22,14 @@ jobs:
|
||||
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: set-up go
|
||||
uses: https://gitea.com/actions/setup-go@v3
|
||||
with:
|
||||
@ -93,37 +103,19 @@ jobs:
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.meta.outputs.VERSION }}
|
||||
changes: ${{ steps.meta.outputs.CHANGES }}
|
||||
needs:
|
||||
- build
|
||||
- build_windows
|
||||
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
|
||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
||||
with:
|
||||
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
|
||||
with:
|
||||
name: ${{ needs.build.outputs.artifact_arm64 }}
|
||||
path: out/
|
||||
|
||||
- name: deploy debian packages
|
||||
env:
|
||||
@ -144,42 +136,21 @@ jobs:
|
||||
Port $SSH_PORT
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
cat ~/.ssh/config
|
||||
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/
|
||||
find -O1 . -name '*.changes' -exec dput mousesoft \{\} \;
|
||||
|
||||
- name: download windows package
|
||||
uses: https://gitea.com/actions/download-artifact@v3-node20
|
||||
with:
|
||||
name: ${{ needs.build_windows.outputs.artifact }}
|
||||
path: out/
|
||||
|
||||
- name: release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
title: "MouseSoft DrawIO-Export ${{ needs.deploy.outputs.version }}"
|
||||
body: "${{ needs.deploy.outputs.changes }}"
|
||||
title: "MouseSoft DrawIO-Export ${{ needs.build.outputs.version }}"
|
||||
body: "${{ needs.build.outputs.changes }}"
|
||||
files: |
|
||||
out/*.deb
|
||||
out/*.msi
|
||||
*.deb
|
||||
*.msi
|
||||
sha256sum: true
|
||||
prerelease: true
|
||||
draft: true
|
||||
|
Loading…
Reference in New Issue
Block a user