Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Build and release an artifact #2

Build and release an artifact

Build and release an artifact #2

Workflow file for this run

name: Build and release an artifact
env:
VERSION: 0.1.1
on: workflow_dispatch
jobs:
buildAndRelease:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Paste the version
shell: powershell
run: Get-ChildItem -Recurse -File -Include *.lua,*.toml | ForEach-Object { (Get-Content $_.FullName) | ForEach-Object { $_ -replace "`{VERSION`}", $env:VERSION } | Set-Content $_.FullName }
- name: Build the package
shell: cmd
run: |
rustup target add i686-pc-windows-msvc
cargo build --release --target i686-pc-windows-msvc
copy .\target\i686-pc-windows-msvc\release\yt_wrapper.dll .\lib\
rmdir /S /q .\target\
- name: Create a release archive
shell: sh
run: |
mkdir ./.youtube_integration
mv ./* ./.youtube_integration
mv ./.youtube_integration ./youtube_integration
7z a -mx9 "release-v${{ env.VERSION }}.zip" ./youtube_integration
- name: Upload the release
uses: ncipollo/release-action@v1
with:
tag: 'v${{ env.VERSION }}'
artifacts: 'release-v${{ env.VERSION }}.zip'