-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a reusable workflow to automatically update SDK packages for a given list of packages. | Action | Result | | ----- | ------- | | <img width="575" alt="Screenshot 2024-03-18 at 19 36 08" src="https://github.com/FuelLabs/fuels-wallet/assets/7074983/3afef33a-dac6-4bfd-b6b2-79e9438e0b2e"> | <img width="890" alt="Screenshot 2024-03-18 at 20 06 08" src="https://github.com/FuelLabs/github-actions/assets/7074983/63e23cd0-2194-4dbf-8f71-9a5d054fcd04"> | ### How to use? ```yaml - uses: FuelLabs/github-actions/update-sdk@master with: branch: master # In case you want to use a different head branch, default is "main" packages: | @fuels @fuels/react @fuels/connectors npm-tag: latest # You might use "latest" or anything else env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ```
- Loading branch information
1 parent
4ecbe2f
commit 6be7065
Showing
13 changed files
with
1,647 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
### Overview | ||
|
||
A github action to update the SDK packages. | ||
|
||
### How to use? | ||
|
||
```yml | ||
- uses: FuelLabs/github-actions/update-sdk@master | ||
with: | ||
repository: ${{ github.repository }} # You can omit it | ||
branch: master # In case you want to use a different head branch (default: main) | ||
npm-tag: ${{ matrix.tag }} # You might use "latest" or anything else, like a matrix strategy | ||
# Remember they need to have the same tag name, otherwise it'll fail | ||
packages: | | ||
@fuels | ||
@fuels/react | ||
@fuels/connectors | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
### Inputs | ||
| Name | Description | Default | | ||
| ------------ | ---------------------------------------------------------- | -------------------------- | | ||
| repository | Github Repository | `${{ github.repository }}` | | ||
| branch | The branch that will be used to create the PR | `main` | | ||
| packages | Packages to update (multiline input) | '' | | ||
| npm-tag | NPM tag (e.g. latest or next) | `latest` | | ||
|
||
### Outputs | ||
|
||
No outputs defined | ||
|
||
## License | ||
|
||
The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "SDK Outdated" | ||
description: "Reusable workflow for update the SDK packages" | ||
|
||
inputs: | ||
repository: | ||
description: "Github Repository" | ||
default: ${{ github.repository }} | ||
branch: | ||
description: "The head branch that will be used to create the PR" | ||
default: main | ||
npm-tag: | ||
description: "NPM tag (e.g. latest or next)" | ||
default: latest | ||
packages: | ||
description: "Packages to update" | ||
required: true | ||
|
||
runs: | ||
using: "node20" | ||
main: "dist/index.js" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "update-sdk", | ||
"private": true, | ||
"license": "Apache-2.0", | ||
"main": "./src/index.ts", | ||
"scripts": { | ||
"ts:check": "tsc --noEmit", | ||
"build": "tsup", | ||
"dev": "tsx src/index.ts" | ||
}, | ||
"devDependencies": { | ||
"@fuels/ts-config": "0.17.0", | ||
"@types/node": "20.11.29", | ||
"chalk": "5.3.0", | ||
"execa": "8.0.1", | ||
"tsup": "8.0.2", | ||
"tsx": "4.7.1" | ||
}, | ||
"dependencies": { | ||
"@actions/core": "1.10.1" | ||
} | ||
} |
Oops, something went wrong.