Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusborgeis committed Aug 11, 2024
0 parents commit 3588533
Show file tree
Hide file tree
Showing 19 changed files with 948 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-all-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish All Crates

on:
workflow_dispatch:

jobs:
publish-crates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Publish crates
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
for crate in rustato-core rustato-macros rustato-proc-macros rustato; do
cd $crate
CURRENT_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
PUBLISHED_VERSION=$(cargo search $crate --limit 1 | sed -n 's/^[^"]*"\([^"]*\)".*/\1/p')
if [ "$CURRENT_VERSION" != "$PUBLISHED_VERSION" ]; then
echo "Publishing $crate version $CURRENT_VERSION"
cargo publish --token $CRATES_IO_TOKEN
else
echo "Skipping $crate, version unchanged"
fi
cd ..
done
38 changes: 38 additions & 0 deletions .github/workflows/publish-crate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Crate

on:
push:
paths:
- 'rustato*/Cargo.toml'
workflow_dispatch:

jobs:
publish-crate:
runs-on: ubuntu-latest
strategy:
matrix:
crate: [rustato-core, rustato-macros, rustato-proc-macros, rustato]
steps:
- uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Check version change
id: check_version
run: |
cd ${{ matrix.crate }}
CURRENT_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
PUBLISHED_VERSION=$(cargo search ${{ matrix.crate }} --limit 1 | sed -n 's/^[^"]*"\([^"]*\)".*/\1/p')
if [ "$CURRENT_VERSION" != "$PUBLISHED_VERSION" ]; then
echo "::set-output name=version_changed::true"
fi
- name: Publish crate
if: steps.check_version.outputs.version_changed == 'true'
run: |
cd ${{ matrix.crate }}
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Arquivos gerados pelo Rust
/target/
**/*.rs.bk

# Arquivos de configuração do Cargo
Cargo.lock

# Arquivos de configuração do IDE
.idea/
.vscode/

# Arquivos de compilação
*.o
*.a
*.so
*.dylib

# Arquivos de log
*.log

# Arquivos temporários
*.tmp
*.swp
*~

# Arquivos específicos do sistema operacional
.DS_Store
Thumbs.db

# Diretórios de dependências
/vendor/

# Arquivos de ambiente
.env

# Arquivos de documentação gerados
/doc/

# Arquivos de teste de cobertura
/coverage/

# Arquivos de saída de benchmark
/benches/target/

# Ignorar todos os arquivos em diretórios target de subcrates
/**/target/

# Ignorar arquivos de configuração local do Cargo
.cargo/config.toml

# Ignorar arquivos de perfil
*.profraw

.cursorignore
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[workspace]
members = [
"rustato",
"rustato-core",
"rustato-macros",
"rustato-proc-macros",
]
default-members = ["rustato"]
resolver = "2"

[workspace.package]
authors = ["Vinicius Borges <[email protected]>"]
edition = "2021"
license = "MIT"
repository = "https://github.com/BiteCraft/rustato"
keywords = ["state-management", "rust", "global-state", "reactive", "application-state"]
categories = ["development-tools"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Rustato Project Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 3588533

Please sign in to comment.