mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
Add github action for cargo publish (#3724)
This commit is contained in:
parent
8c3cd634a8
commit
92ceb8e323
1 changed files with 12 additions and 2 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macOS-latest, windows-2019, ubuntu-16.04]
|
os: [macOS-latest, windows-2019, ubuntu-16.04]
|
||||||
kind: ['test', 'test_debug', 'bench', 'lint']
|
kind: ['test', 'test_debug', 'bench', 'lint', 'test_publish']
|
||||||
exclude:
|
exclude:
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
kind: 'bench'
|
kind: 'bench'
|
||||||
|
@ -26,6 +26,11 @@ jobs:
|
||||||
kind: 'test_debug'
|
kind: 'test_debug'
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
kind: 'test_debug'
|
kind: 'test_debug'
|
||||||
|
|
||||||
|
- os: windows-2019
|
||||||
|
kind: 'test_publish'
|
||||||
|
- os: macOS-latest
|
||||||
|
kind: 'test_publish'
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
run: git config --global core.symlinks true
|
run: git config --global core.symlinks true
|
||||||
|
@ -127,6 +132,10 @@ jobs:
|
||||||
if: matrix.kind == 'test' || matrix.kind == 'bench'
|
if: matrix.kind == 'test' || matrix.kind == 'bench'
|
||||||
run: cargo build --release --locked --all-targets
|
run: cargo build --release --locked --all-targets
|
||||||
|
|
||||||
|
- name: dry-run cargo package
|
||||||
|
if: matrix.kind == 'test_publish'
|
||||||
|
run: ./tools/cargo_publish.py --dry-run
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: matrix.kind == 'test'
|
if: matrix.kind == 'test'
|
||||||
run: cargo test --release --locked --all-targets
|
run: cargo test --release --locked --all-targets
|
||||||
|
@ -190,7 +199,8 @@ jobs:
|
||||||
if: >
|
if: >
|
||||||
startsWith(github.ref, 'refs/tags/') &&
|
startsWith(github.ref, 'refs/tags/') &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
runner.os == 'Linux'
|
matrix.kind == 'test' &&
|
||||||
|
startsWith(matrix.os, 'ubuntu')
|
||||||
env:
|
env:
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
run: ./tools/cargo_publish.py
|
run: ./tools/cargo_publish.py
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue