Skip to content

Commit cc28d51

Browse files
committed
📦 Use a config file
1 parent feee7b0 commit cc28d51

File tree

3 files changed

+27
-47
lines changed

3 files changed

+27
-47
lines changed

.github/workflows/test.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
1515
steps:
1616
- name: Deploy Rust to GitHub Pages
17-
uses: valkyrie-language/github-rust-publish@v0.1.8
17+
uses: valkyrie-language/github-rust-publish@v0.0.0
1818
with:
19-
github: text,
20-
trunk: "[1, true]"
21-
others: "key: value"
19+
config: .config/Publish.toml

Readme.md

+22-32
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
1-
```yaml
2-
name: Build and Deploy
3-
on: [push, pull_request]
1+
2+
3+
### Configuration file query order
4+
5+
```sh
6+
name: Github Rust Publish
7+
8+
on:
9+
push:
10+
branches: [ master, dev ]
11+
pull_request:
12+
branches: [ master, dev ]
13+
414
jobs:
5-
build-and-deploy:
6-
name: Rust github pages deploy
7-
runs-on: ubuntu-latest
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
820
steps:
9-
- name: Checkout Actions
10-
uses: actions/[email protected]
21+
- name: Publish Rust Binary
22+
uses: valkyrie-language/[email protected]
1123
with:
12-
persist-credentials: false
13-
- name: Install latest nightly
14-
uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: nightly
17-
override: true
18-
components: rustfmt, clippy
19-
- uses: jetli/[email protected]
20-
with:
21-
version: 'latest'
22-
- name: trunk build
23-
env: VERSION=v0.6.0
24-
run: |
25-
wget -qO- https://github.com/thedodd/trunk/releases/download/${VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
26-
trunk build
27-
- name: Deploy to github pages
28-
uses: JamesIves/[email protected]
29-
with:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
BRANCH: gh-pages
32-
FOLDER: build
33-
CLEAN: true
34-
35-
```
24+
config: .config/Publish.toml
25+
```

projects/publish-wasm32-wasi/action.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,9 @@ runs:
1010
env:
1111
GITHUB_TOKEN: As provided by Github Actions
1212
inputs:
13-
github:
14-
description: Publish to github release
15-
required: false
16-
default: '{json}'
17-
crates:
18-
description: Publish to crates
19-
required: false
20-
default: '{json}'
21-
npm:
22-
description: Publish to npm
23-
required: false
13+
config:
14+
description: Path of the config file
15+
required: true
2416
default: '{json}'
2517
outputs:
2618
DEPLOYMENT_STATUS:

0 commit comments

Comments
 (0)