diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b586c78..36d1906 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,27 +3,28 @@ name: Publish on: release: types: [published] - + jobs: - # FIXME: needs a running server locally for the local-addon - # publish-v1: - # if: ${{ startsWith(github.event.release.tag_name, 'v1') }} - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # - name: Setup NodeJS - # uses: actions/setup-node@v4 - # with: - # node-version: 20 - # cache: 'npm' - # registry-url: https://registry.npmjs.org/ - # - name: Install NPM dependencies - # run: npm ci - # - name: Publish to NPM - # run: npm publish --workspace stremio-official-addons --access public - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + publish-v1: + if: ${{ startsWith(github.event.release.tag_name, 'v1') }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + registry-url: https://registry.npmjs.org/ + - name: Install NPM dependencies + run: npm ci + # At this point, the index.json is manually updated and committed for v1 + # No need to generate the addons list + - name: Publish to NPM + run: npm publish --workspace stremio-official-addons --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} publish-v2: if: ${{ startsWith(github.event.release.tag_name, 'v2') }} @@ -41,13 +42,13 @@ jobs: uses: dtolnay/rust-toolchain@1.61 - name: Install NPM dependencies run: npm ci - - name: Build + - name: Build addons list run: npm run --workspace official-addons-v2 build - name: Publish to NPM run: npm publish --workspace official-addons-v2 --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - - name: Publish to crates.io + - name: Build and publish crate to crates.io run: cargo publish -p stremio-official-addons --allow-dirty --token "$CARGO_AUTH_TOKEN" env: CARGO_AUTH_TOKEN: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 62e2396..cdf8a8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "stremio-official-addons" -version = "2.0.11" +version = "2.0.12" dependencies = [ "once_cell", "serde_json", diff --git a/README.md b/README.md index 9559b15..3824e35 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,73 @@ Besides changing this module, you have to update all it's dependant packages, mo * stremio-api-legacy-shim: this one does not *depend on* this module, and does not include it, but it contains a separate list of official add-ons in `addons/official.js` that is respected by all apps using the legacy endpoints **ARCHIVED** +# Release new version + +## Version 1.XX.XX +To release a new version for v1 **npm** package you need to: + +1. Bump [`package.json`](./package.json) + +1.1. Make sure to update [`package-lock.json`](./package-lock.json): + +`npm i --package-lock-only` + +2. Make a new tag + +`git tag -a v1.XX.XX -m "Tag for releases v1.XX.XX"` + +3. Push it to the repo + +`git push -u origin v1.XX.XX` + +4. Create a [new release](https://github.com/Stremio/stremio-official-addons/releases) using the version as a title, e.g. `v1.5.6` and automatically generate changes from previous tag. + +5. The [`publish` workflow](./.github/workflows/publish.yml) will run the `v1` job and will: + 1. Build [`stremio-official-addons@1`][v1-npm-link] package + 2. Publish the [package on npm][v1-npm-link] + +## Version 2.XX.XX + +To release a new version for v2 **npm** and **crate** packages you need to: +1. Bump [`official-addons-v2/package.json`](./official-addons-v2/package.json) + +1.1. Make sure to update [`package-lock.json`](./package-lock.json): + +`npm i --package-lock-only` + +2. Bump [`official-addons-v2/Cargo.toml`](./official-addons-v2/Cargo.toml) + +2.1. Make sure to update [`Cargo.lock`](./Cargo.lock): + +`cargo update -p stremio-official-addons` + +3. Make a new tag + +`git tag -a v2.XX.XX -m "Tag for releases v2.XX.XX"` + +4. Push it to the repo + +`git push -u origin v2.XX.XX` + +5. Create a [new release](https://github.com/Stremio/stremio-official-addons/releases) using the version as a title, e.g. `v2.0.12` and automatically generate changes from previous tag. + +6. The [`publish` workflow](./.github/workflows/publish.yml) will run the `v2` job and will: + 1. Build [`@stremio/stremio-official-addons@2`][v2-npm-link] package + 2. Publish the [package on npm][v2-npm-link] + 3. Publish the [crate on crates.io][v2-crates-io-link] + +# License + +Both packages are licensed under the MIT license: +- [`stremio-official-addons` v1 MIT license](./LICENSE.md) +- [`stremio-official-addons` v2 MIT license](./official-addons-v2/LICENSE.md) + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in the project by you, shall be licensed as MIT, +without any additional terms or conditions. + [v1-npm-link]: https://www.npmjs.com/package/stremio-official-addons [stremio-official-addons downloads badge]: https://img.shields.io/npm/dm/stremio-official-addons?label=stremio-official-addons%20downloads&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fstremio-official-addons diff --git a/official-addons-v2/Cargo.toml b/official-addons-v2/Cargo.toml index 506b515..7f42bd1 100644 --- a/official-addons-v2/Cargo.toml +++ b/official-addons-v2/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "stremio-official-addons" description = "All of the stremio official addons" -version = "2.0.11" +version = "2.0.12" authors = ["Smart Code OOD"] edition = "2018" license = "MIT" readme = "README.md" repository = "https://github.com/Stremio/stremio-official-addons" +homepage = "https://stremio.com" include = [ "/src/**/*.rs", "/Cargo.toml", diff --git a/official-addons-v2/README.md b/official-addons-v2/README.md index b8fdec7..b5d2110 100644 --- a/official-addons-v2/README.md +++ b/official-addons-v2/README.md @@ -18,6 +18,9 @@ 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. +# License + +This project is licensed under the [MIT license](./LICENSE.md). [v2-npm-link]: https://www.npmjs.com/package/@stremio/stremio-official-addons [downloads badge]: https://img.shields.io/npm/dm/%40stremio/stremio-official-addons?label=%40stremio%2Fstremio-official-addons%20downloads&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40stremio%2Fstremio-official-addons diff --git a/official-addons-v2/package.json b/official-addons-v2/package.json index b1ed1a9..67cb5b9 100644 --- a/official-addons-v2/package.json +++ b/official-addons-v2/package.json @@ -1,7 +1,8 @@ { "name": "@stremio/stremio-official-addons", - "version": "2.0.11", + "version": "2.0.12", "description": "All of the stremio official addons", + "homepage": "https://stremio.com", "author": "Smart Code OOD", "main": "addons.json", "license": "MIT", diff --git a/package-lock.json b/package-lock.json index 50ac82d..3554196 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,20 @@ { "name": "stremio-official-addons", - "version": "1.5.5", + "version": "1.5.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "stremio-official-addons", - "version": "1.5.4", + "version": "1.5.6", "license": "MIT", "workspaces": [ ".", "official-addons-v2" ], "devDependencies": { - "stremio-addon-client": "^1.5.2" + "stremio-addon-client": "^1.5.2", + "stremio-local-addon": "https://git@github.com/Stremio/stremio-local-addon#79cd88c32aa26270af8b662fa7bd92b657f6e14f" } }, "node_modules/@stremio/stremio-core-validator": { @@ -1184,7 +1185,7 @@ }, "official-addons-v2": { "name": "@stremio/stremio-official-addons", - "version": "2.0.11", + "version": "2.0.12", "license": "MIT", "devDependencies": { "@stremio/stremio-core-validator": "2.0.2", @@ -1963,6 +1964,7 @@ "requires": { "@stremio/stremio-official-addons": "file:official-addons-v2", "stremio-addon-client": "^1.5.2", + "stremio-local-addon": "https://git@github.com/Stremio/stremio-local-addon#79cd88c32aa26270af8b662fa7bd92b657f6e14f", "stremio-official-addons": "file:" }, "dependencies": { diff --git a/package.json b/package.json index 864d6cd..af88bda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stremio-official-addons", - "version": "1.5.5", + "version": "1.5.6", "description": "All the stremio official add-ons, in AddonCollection.load() format", "main": "index.js", "scripts": { @@ -20,7 +20,7 @@ "bugs": { "url": "https://github.com/Stremio/stremio-official-addons/issues" }, - "homepage": "https://github.com/Stremio/stremio-official-addons#readme", + "homepage": "https://stremio.com", "devDependencies": { "stremio-addon-client": "^1.5.2", "stremio-local-addon": "https://git@github.com/Stremio/stremio-local-addon#79cd88c32aa26270af8b662fa7bd92b657f6e14f"