mirror of https://github.com/Wilfred/difftastic/
Merge commit 'f35789006ccbe5be8db21d1a2dd4cc0b5a1286f2'
commit
b636201a8c
@ -0,0 +1,33 @@
|
||||
name: Publish on crates.io
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust stable
|
||||
run: |
|
||||
rustup toolchain install stable --profile minimal --no-self-update
|
||||
|
||||
- name: Verify publish crate
|
||||
uses: katyo/publish-crates@v1
|
||||
with:
|
||||
dry-run: true
|
||||
|
||||
- name: Publish crate
|
||||
uses: katyo/publish-crates@v1
|
||||
with:
|
||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
@ -0,0 +1,36 @@
|
||||
// swift-tools-version:5.3
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "TreeSitterC",
|
||||
platforms: [.macOS(.v10_13), .iOS(.v11)],
|
||||
products: [
|
||||
.library(name: "TreeSitterC", targets: ["TreeSitterC"]),
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.target(name: "TreeSitterC",
|
||||
path: ".",
|
||||
exclude: [
|
||||
"binding.gyp",
|
||||
"bindings",
|
||||
"Cargo.toml",
|
||||
"examples",
|
||||
"grammar.js",
|
||||
"LICENSE",
|
||||
"Makefile",
|
||||
"package.json",
|
||||
"README.md",
|
||||
"src/grammar.json",
|
||||
"src/node-types.json",
|
||||
],
|
||||
sources: [
|
||||
"src/parser.c",
|
||||
],
|
||||
resources: [
|
||||
.copy("queries")
|
||||
],
|
||||
publicHeadersPath: "bindings/swift",
|
||||
cSettings: [.headerSearchPath("src")])
|
||||
]
|
||||
)
|
||||
@ -0,0 +1,16 @@
|
||||
#ifndef TREE_SITTER_C_H_
|
||||
#define TREE_SITTER_C_H_
|
||||
|
||||
typedef struct TSLanguage TSLanguage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern TSLanguage *tree_sitter_c();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // TREE_SITTER_C_H_
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue