Skip to content

Prepare release 0.26.0 #35

Prepare release 0.26.0

Prepare release 0.26.0 #35

Workflow file for this run

name: 📦 Prepare Release
run-name: Prepare release ${{ github.ref_name }}
on:
push:
tags:
- '**'
permissions:
contents: write
env:
BUILD_VERSION: ${{ github.ref_name }}
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.100
- name: Build and test
run: |
dotnet restore FScript.sln
dotnet build FScript.sln -c Release --no-restore
dotnet test FScript.sln -c Release --no-build
- name: Publish artifacts
run: make publish-all config=Release version=${{ env.BUILD_VERSION }}
- name: Pack release archives
run: |
(cd .out/dotnet; zip ../fscript-${BUILD_VERSION}-dotnet.zip ./*)
(cd .out/windows/x64; zip ../../fscript-${BUILD_VERSION}-windows-x64.zip ./*)
(cd .out/windows/arm64; zip ../../fscript-${BUILD_VERSION}-windows-arm64.zip ./*)
(cd .out/linux/x64; zip ../../fscript-${BUILD_VERSION}-linux-x64.zip ./*)
(cd .out/linux/arm64; zip ../../fscript-${BUILD_VERSION}-linux-arm64.zip ./*)
cp entitlements.plist .out/darwin/entitlements.plist
(cd .out/darwin; zip -r ../fscript-${BUILD_VERSION}-darwin-unsigned.zip ./*)
- name: Extract version suffix
run: |
s=${{ github.ref_name }}
pat="([^-]*)-?([^-]*)"
[[ $s =~ $pat ]]
BUILD_VERSION_SUFFIX=${BASH_REMATCH[2]}
echo "BUILD_VERSION_SUFFIX=$BUILD_VERSION_SUFFIX" >> $GITHUB_ENV
- name: Create draft GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
draft: true
prerelease: ${{ env.BUILD_VERSION_SUFFIX != '' }}
generate_release_notes: true
files: |
.out/*.zip
.out/*.nupkg