codesnap.nvim/.github/workflows/release.yml
Mist 08f0b24cf4
[Release] v1.0.0 (#43)
* [Update] apply template

* [Feat] update assets files (#35)

* [Update] README add packer install config

* [Feat] take snapshot via skia engine

* [Feat] title component

* [Feat] add watermark

* [Feat] update padding of code panel

* [Remove] pack ci script

* [Release] v1.0.0

* [Update] apply template

* [Chore] remove unused code

* [Update] readme

* [Release] v1.0.1

* [Update] apply template

* [Update] readme

* Update README.md

* [Feat] compile nvim-0.9 FFI

* [Release] v1.0.2

* [Update] apply template

* [Update] README.md

* [Feat] add multi platform support

* [Feat] add workflow for build target binary package

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Update] files based on generated files by template generator

* [Feat] build plugin after released

* [Delete] build.yml

* [Update] README

* [Release] v1.0.3

* [Update] README

* [Refactor] editor frame size calculation logic

* [Refactor] update margin of watermark

* [Feat] preset font family

* [Refactor] update component interface

* [Update] change theme to onedark

* [Refactor] redefine render_error and throw it to lua scope

* [Perf] build script

* [Refactor] abstract component concept & implement it for all widgets

* [Update] README.md

---------

Co-authored-by: mistricky <mistricky@users.noreply.github.com>
2024-03-17 01:07:12 +08:00

107 lines
2.8 KiB
YAML

name: Release
on:
push:
paths:
project.toml
branches:
- main
permissions:
contents: write
jobs:
build:
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
origin_dylib_suffix: so
dest_dylib_suffix: so
- os_name: mac-x86_64
os: macOS-latest
target: x86_64-apple-darwin
origin_dylib_suffix: dylib
dest_dylib_suffix: so
- os_name: mac-aarch64
os: macOS-latest
target: aarch64-apple-darwin
origin_dylib_suffix: dylib
dest_dylib_suffix: so
toolchain:
- stable
steps:
- uses: actions/checkout@v3
- name: Build library
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
working-directory: ./generator
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--release"
- name: Rename dynamic lib
run: cp generator/target/${{ matrix.platform.target }}/release/libgenerator.${{ matrix.platform.origin_dylib_suffix }} lua/${{ matrix.platform.os_name }}generator.${{ matrix.platform.dest_dylib_suffix }}
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
message: '[Update] files based on generated files by template generator'
pull_strategy: 'NO-PULL'
push: false
- name: Push changes
run: |
git pull --rebase
git push
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Replace template
run: python3 scripts/replace-template.py
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "[Update] apply template"
- name: Read version from project config
id: read_toml
uses: SebRollen/toml-action@v1.0.2
with:
file: project.toml
field: project.version
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.read_toml.outputs.value }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
generateReleaseNotes: true