Update release.yml
This commit is contained in:
parent
8102e46b37
commit
49499f10e3
1 changed files with 27 additions and 24 deletions
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
|
|
@ -14,10 +14,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source Code
|
- name: Checkout Source Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Get Python
|
- name: Get Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
run: .\dist\nte-history-exporter.exe --help
|
run: .\dist\nte-history-exporter.exe --help
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: windows
|
name: windows
|
||||||
path: dist/nte-history-exporter.exe
|
path: dist/nte-history-exporter.exe
|
||||||
|
|
@ -48,13 +48,13 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source Code
|
- name: Checkout Source Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install libpcap
|
- name: Install libpcap
|
||||||
run: sudo apt-get update && sudo apt-get install -y libpcap-dev
|
run: sudo apt-get update && sudo apt-get install -y libpcap-dev
|
||||||
|
|
||||||
- name: Get Python
|
- name: Get Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ jobs:
|
||||||
run: ./dist/nte-history-exporter --help
|
run: ./dist/nte-history-exporter --help
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: linux
|
name: linux
|
||||||
path: dist/nte-history-exporter
|
path: dist/nte-history-exporter
|
||||||
|
|
@ -85,13 +85,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source Code
|
- name: Checkout Source Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install libpcap
|
|
||||||
run: brew update && brew install libpcap
|
|
||||||
|
|
||||||
- name: Get Python
|
- name: Get Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
|
|
@ -110,7 +107,7 @@ jobs:
|
||||||
run: ./dist/nte-history-exporter --help
|
run: ./dist/nte-history-exporter --help
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: macos
|
name: macos
|
||||||
path: dist/nte-history-exporter
|
path: dist/nte-history-exporter
|
||||||
|
|
@ -123,7 +120,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source Code
|
- name: Checkout Source Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Get package version
|
- name: Get package version
|
||||||
id: package-version
|
id: package-version
|
||||||
|
|
@ -132,7 +129,7 @@ jobs:
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
|
|
||||||
- name: Rename
|
- name: Rename
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -149,16 +146,22 @@ jobs:
|
||||||
zip nte-history-exporter-v${version}-x86_64-apple-darwin.zip nte-history-exporter
|
zip nte-history-exporter-v${version}-x86_64-apple-darwin.zip nte-history-exporter
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: marvinpinto/action-automatic-releases@latest
|
env:
|
||||||
with:
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
run: |
|
||||||
automatic_release_tag: v${{ steps.package-version.outputs.version }}
|
version="${{ steps.package-version.outputs.version }}"
|
||||||
prerelease: false
|
tag="v${version}"
|
||||||
title: v${{ steps.package-version.outputs.version }} Release
|
files=(
|
||||||
files: |
|
|
||||||
nte-history-exporter.exe
|
nte-history-exporter.exe
|
||||||
nte-history-exporter-linux
|
nte-history-exporter-linux
|
||||||
nte-history-exporter-macos
|
nte-history-exporter-macos
|
||||||
nte-history-exporter-v${{ steps.package-version.outputs.version }}-x86_64-pc-windows-msvc.zip
|
nte-history-exporter-v${version}-x86_64-pc-windows-msvc.zip
|
||||||
nte-history-exporter-v${{ steps.package-version.outputs.version }}-x86_64-unknown-linux-gnu.zip
|
nte-history-exporter-v${version}-x86_64-unknown-linux-gnu.zip
|
||||||
nte-history-exporter-v${{ steps.package-version.outputs.version }}-x86_64-apple-darwin.zip
|
nte-history-exporter-v${version}-x86_64-apple-darwin.zip
|
||||||
|
)
|
||||||
|
|
||||||
|
if gh release view "$tag" >/dev/null 2>&1; then
|
||||||
|
gh release upload "$tag" "${files[@]}" --clobber
|
||||||
|
else
|
||||||
|
gh release create "$tag" "${files[@]}" --title "${tag} Release" --notes "Release ${tag}"
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue