summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRy Dahl <ry@tinyclouds.org>2020-01-17 17:53:13 -0500
committerGitHub <noreply@github.com>2020-01-17 17:53:13 -0500
commitd7203092039d3c46ca8480ff8eecf612deb2b2f6 (patch)
treeb247e948bc65d710f6e86d995aca9c20089cf728
parent35eb79610f4b451af1d4a9c286fd63875d28bca5 (diff)
Auto cargo-publish on tags (#3704)
fix tools/cargo_publish.py
-rw-r--r--.github/workflows/ci.yml9
-rwxr-xr-xtools/cargo_publish.py (renamed from tools/cargo_publish_others.py)8
2 files changed, 12 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 48d86e5c4..28b8bc300 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -186,5 +186,14 @@ jobs:
target/release/deno_src.tar.gz
draft: true
+ - name: Publish
+ if: >
+ startsWith(github.ref, 'refs/tags/') &&
+ github.repository == 'denoland/deno' &&
+ runner.os == 'Linux'
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ run: ./tools/cargo_publish.py
+
- name: Stop sccache
run: sccache --stop-server
diff --git a/tools/cargo_publish_others.py b/tools/cargo_publish.py
index 83b9b50e2..b8fa1f037 100755
--- a/tools/cargo_publish_others.py
+++ b/tools/cargo_publish.py
@@ -1,7 +1,4 @@
#!/usr/bin/env python
-# Publishes 'deno_cli', 'deno_cli_snapshots', and 'deno_typescript' crates.
-# DOES NOT PUBLISH 'deno' crate see tools/cargo_package.py for that.
-
import os
import sys
import argparse
@@ -17,11 +14,12 @@ def main():
if args.dry_run:
cargo_publish += ["--dry-run"]
- # Publish the deno_typescript crate.
+ os.chdir(os.path.join(root_path, "core"))
+ run(cargo_publish)
+
os.chdir(os.path.join(root_path, "deno_typescript"))
run(cargo_publish)
- # Publish the deno_cli crate.
os.chdir(os.path.join(root_path, "cli"))
run(cargo_publish)