Skip to content

Commit

Permalink
chore: move rust v2 of the package/crate to master
Browse files Browse the repository at this point in the history
  • Loading branch information
elpiel committed Jan 3, 2024
1 parent 99bc328 commit 218cf99
Show file tree
Hide file tree
Showing 11 changed files with 2,099 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 12
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Set default rust toolchain
run: rustup default 1.61.0
- name: Change directory
run: cd official-addons-rs
- name: Install NPM dependencies
run: npm ci
- name: Build
run: npm run build
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 12
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Set default rust toolchain
run: rustup default 1.61.0
- name: Change directory
run: cd official-addons-rs
- name: Install NPM dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish to crates.io
run: cargo publish --allow-dirty --token "$CARGO_AUTH_TOKEN"
env:
CARGO_AUTH_TOKEN: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }}
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.github
/scripts
/src
/target
**/Cargo.toml
**/Cargo.lock
3 changes: 3 additions & 0 deletions official-addons-rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/addons.json
/node_modules
**/target
7 changes: 7 additions & 0 deletions official-addons-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions official-addons-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "stremio-official-addons"
description = "All of the stremio official addons"
version = "2.0.11"
authors = ["Smart Code OOD"]
edition = "2018"
license = "MIT"
readme = "README.md"
repository = "https://github.com/Stremio/stremio-official-addons"
include = [
"/src/**/*.rs",
"/Cargo.toml",
"/addons.json",
"/README.md"
]

[lib]
doctest = false

[dependencies]
13 changes: 13 additions & 0 deletions official-addons-rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stremio-official-addons

All of the stremio official addons.

## Build

To re-generate `addons.json` you can run `npm run build`

## Changing the official addons collection

To change what's contained in this module, you have to change `scripts/build.js`

Besides changing this module, you have to update all it's dependant packages.
Loading

0 comments on commit 218cf99

Please sign in to comment.