Skip to content

Commit

Permalink
Merge pull request #29 from jigsawye/feat/1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jigsawye authored Nov 10, 2024
2 parents b23dbd5 + 0939755 commit ef4cc49
Show file tree
Hide file tree
Showing 17 changed files with 952 additions and 118 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
10 changes: 10 additions & 0 deletions .changeset/lucky-berries-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@swagit/darwin-arm64': major
'@swagit/linux-arm64': major
'@swagit/darwin-x64': major
'@swagit/linux-x64': major
'@swagit/win32-x64': major
'swagit': major
---

Rewrite in Rust
72 changes: 0 additions & 72 deletions .github/workflows/build.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/publish.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
strategy:
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
name: darwin-arm64
- os: macos-latest
target: x86_64-apple-darwin
name: darwin-x64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-x64
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
name: linux-arm64
- os: windows-latest
target: x86_64-pc-windows-msvc
name: win32-x64

name: Release ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: pnpm

- name: Install Dependencies
run: pnpm install

- name: Build binary
run: cargo build --release --target ${{ matrix.target }}

- name: Prepare package
shell: bash
run: |
mkdir -p npm/@swagit/${{ matrix.name }}/bin
if [ "${{ matrix.name }}" = "win32-x64" ]; then
cp target/${{ matrix.target }}/release/swagit.exe npm/@swagit/${{ matrix.name }}/bin/
else
cp target/${{ matrix.target }}/release/swagit npm/@swagit/${{ matrix.name }}/bin/
fi
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
![Swagit](https://i.imgur.com/kYSEMFD.png)

[![Build Status](https://travis-ci.com/jigsawye/swagit.svg?branch=master)](https://travis-ci.com/jigsawye/swagit)

## Usage

```bash
Expand Down
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "swagit",
"version": "0.0.0",
"private": true,
"description": "A swag tool to use git with interactive cli",
"author": "Evan Ye <jigsaw.ye@gmail.com>",
"license": "MIT",
"bin": {
"sg": "bin/swagit.js",
"swagit": "bin/swagit.js"
},
"packageManager": "pnpm@9.12.3",
"devDependencies": {
"@changesets/cli": "^2.27.9"
},
"scripts": {
"changeset": "changeset",
"version": "changeset version",
"release": "changeset publish"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ef4cc49

Please sign in to comment.