1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

Add github action for cargo publish (#3724)

This commit is contained in:
Ry Dahl 2020-01-21 16:30:27 -05:00 committed by GitHub
parent 8c3cd634a8
commit 92ceb8e323
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [macOS-latest, windows-2019, ubuntu-16.04]
kind: ['test', 'test_debug', 'bench', 'lint']
kind: ['test', 'test_debug', 'bench', 'lint', 'test_publish']
exclude:
- os: windows-2019
kind: 'bench'
@ -26,6 +26,11 @@ jobs:
kind: 'test_debug'
- os: macOS-latest
kind: 'test_debug'
- os: windows-2019
kind: 'test_publish'
- os: macOS-latest
kind: 'test_publish'
steps:
- name: Configure git
run: git config --global core.symlinks true
@ -127,6 +132,10 @@ jobs:
if: matrix.kind == 'test' || matrix.kind == 'bench'
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
if: matrix.kind == 'test'
run: cargo test --release --locked --all-targets
@ -190,7 +199,8 @@ jobs:
if: >
startsWith(github.ref, 'refs/tags/') &&
github.repository == 'denoland/deno' &&
runner.os == 'Linux'
matrix.kind == 'test' &&
startsWith(matrix.os, 'ubuntu')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: ./tools/cargo_publish.py