mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
make releases on tag push
This commit is contained in:
parent
d7fda7cf1b
commit
ceee22e72d
2 changed files with 61 additions and 2 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
|
@ -1,6 +1,10 @@
|
|||
name: .NET Build
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
tags-ignore: '*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -21,7 +25,7 @@ jobs:
|
|||
run: |
|
||||
dotnet build --no-restore --configuration Release --nologo
|
||||
- name: Archive
|
||||
run: Compress-Archive -Path Penumbra/bin/Release/* -DestinationPath Penumbra.zip
|
||||
run: Compress-Archive -Path Penumbra/bin/Release/net472/* -DestinationPath Penumbra.zip
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
|
|
|
|||
55
.github/workflows/release.yml
vendored
Normal file
55
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
name: Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.100
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Download Dalamud
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://goaaats.github.io/ffxiv/tools/launcher/addons/Hooks/latest.zip -OutFile latest.zip
|
||||
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\"
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet build --no-restore --configuration Release --nologo
|
||||
- name: write version into json
|
||||
run: |
|
||||
((get-content -Path ./Penumbra.json -raw) -replace '1.0.0.0', '${{ github.ref }}') | set-content -path ./Penumbra.json
|
||||
- name: Archive
|
||||
run: Compress-Archive -Path Penumbra/bin/Release/net472/* -DestinationPath Penumbra.${{ github.ref }}.zip -p:Version=${{ github.ref }} -p:FileVersion=${{ github.ref }}
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
path: |
|
||||
./Penumbra/bin/Release/net472/*
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.run_number }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./Penumbra.${{ github.ref }}.zip
|
||||
asset_name: Penumbra.${{ github.ref }}.zip
|
||||
asset_content_type: application/zip
|
||||
Loading…
Add table
Add a link
Reference in a new issue