Skip to content

Commit

Permalink
Create release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari authored Dec 3, 2024
1 parent 3063e5f commit f966832
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Pack JSON Folder and Release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
pack-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Download NexusMods.Archives.Nx Repository
run: |
git clone https://github.com/Nexus-Mods/NexusMods.Archives.Nx.git
- name: Set Up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'

- name: Restore Dependencies for NexusMods.Archives.Nx.Cli
run: |
cd NexusMods.Archives.Nx/NexusMods.Archives.Nx.Cli
dotnet restore
- name: Pack JSON Folder
run: |
cd NexusMods.Archives.Nx/NexusMods.Archives.Nx.Cli
dotnet run -- pack --source ../../../../json --target ../../../../packed_output.nx --deduplicate-chunked=true --chunkedlevel=22
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload .nx File to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
asset_path: ./packed_output.nx
asset_name: packed_output.nx
asset_content_type: application/octet-stream

0 comments on commit f966832

Please sign in to comment.