+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 'AutoRelease'

on:
workflow_dispatch:
inputs:
version_suffix:
description: Suffix of the version number. Can be used to create a preview package.
required: false
type: string

env:
configuration: Release
version_suffix: ${{ github.event.inputs.version_suffix }}

jobs:
build_linux:
name: Build (Linux)
runs-on: ubuntu-latest
container:
image: fedora:latest
env:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1

defaults:
run:
shell: bash

steps:
- name: Install dependencies
run: sudo dnf -y upgrade && sudo dnf -y install meson gobject-introspection-devel git gcc glib2-devel gdk-pixbuf2 gdk-pixbuf2-modules cairo-gobject

- name: Prepare git
run: git config --global core.autocrlf false
shell: bash

- name: Checkout with submodules
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Create Gir.Core
uses: ./.github/actions/create
with:
configuration: ${{ env.configuration }}
source_directory: './src'
script_directory: './scripts'
shell: bash

- name: Pack release version
run: dotnet pack --no-build --nologo -c $configuration --version-suffix "$version_suffix" -o ../Nuget
working-directory: './src'

- name: "Create GitHub release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prerelease_flag=""
if [ -n "$version_suffix" ]; then
prerelease_flag="--prerelease"
fi
version = dotnet fsi ./scripts/GetVersion.fsx "$version_suffix"
gh release create "$version" --draft --generate-notes --title "$version" $prerelease_flag ../Nuget/*
7 changes: 5 additions & 2 deletions scripts/GetVersion.fsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#r "nuget: FSharp.Data, 6.4.1"

open FSharp.Data

let versionSuffix = match fsi.CommandLineArgs.Length with
| n when n > 1 -> "-" + fsi.CommandLineArgs.[1]
| _ -> ""

type publishingProperties = XmlProvider<"../properties/GirCore.Publishing.props">

let versionPrefix = publishingProperties.GetSample().PropertyGroups
Expand All @@ -10,5 +13,5 @@ let versionPrefix = publishingProperties.GetSample().PropertyGroups
|Some vp -> vp.VersionPrefix.Value
|None -> "Versionprefix not found"

System.Console.WriteLine(versionPrefix)
System.Console.WriteLine(versionPrefix+versionSuffix)

1 change: 1 addition & 0 deletions src/GirCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
..\.github\workflows\codeql-analysis.yml = ..\.github\workflows\codeql-analysis.yml
..\.github\workflows\update-gir-files.yml = ..\.github\workflows\update-gir-files.yml
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Generation", "Generation", "{5D5D80C1-4D21-4619-8B59-7B7750016E9D}"
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载