summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-01-24 14:24:27 -0500
committerGitHub <noreply@github.com>2020-01-24 14:24:27 -0500
commit3059558d41690bb0bc70abd65ac42577019a8072 (patch)
tree8c814e46a73f0ea54fdb5c26e886b487f137bab0
parent950537e8ef6e54c409a7fcafa0b087e68988d9ef (diff)
fix cargo-publish-on-tag (#3781)
Also rename the "test" CI worker to "test_release"
-rw-r--r--.github/workflows/ci.yml30
-rwxr-xr-xtools/cargo_publish.py28
-rwxr-xr-xtools/upload_docs.py2
3 files changed, 20 insertions, 40 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 22b21fdcc..8ac875d4f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [macOS-latest, windows-2019, ubuntu-16.04]
- kind: ['test', 'test_debug', 'bench', 'lint']
+ kind: ['test_release', 'test_debug', 'bench', 'lint']
exclude:
- os: windows-2019
kind: 'bench'
@@ -37,7 +37,7 @@ jobs:
submodules: true
- name: Create source tarballs (release, linux)
- if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
+ if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
run: |
mkdir -p target/release
tar --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno
@@ -124,11 +124,11 @@ jobs:
run: cargo clippy --all-targets --release --locked -- -D clippy::all
- name: Build
- if: matrix.kind == 'test' || matrix.kind == 'bench'
+ if: matrix.kind == 'test_release' || matrix.kind == 'bench'
run: cargo build --release --locked --all-targets
- - name: Test
- if: matrix.kind == 'test'
+ - name: Test release
+ if: matrix.kind == 'test_release'
run: cargo test --release --locked --all-targets
- name: Test debug
@@ -162,20 +162,20 @@ jobs:
cat /proc/meminfo
- name: Pre-release (linux)
- if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test'
+ if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test_release'
run: gzip -f -S _linux_x64.gz target/release/deno
- name: Pre-release (mac)
- if: startsWith(matrix.os, 'macOS') && matrix.kind == 'test'
+ if: startsWith(matrix.os, 'macOS') && matrix.kind == 'test_release'
run: gzip -f -S _osx_x64.gz target/release/deno
- name: Pre-release (windows)
- if: startsWith(matrix.os, 'windows') && matrix.kind == 'test'
+ if: startsWith(matrix.os, 'windows') && matrix.kind == 'test_release'
run: Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno_win_x64.zip
- name: Release
uses: softprops/action-gh-release@v1
- if: matrix.kind == 'test' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
+ if: matrix.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -190,11 +190,19 @@ jobs:
if: >
startsWith(github.ref, 'refs/tags/') &&
github.repository == 'denoland/deno' &&
- matrix.kind == 'test' &&
+ matrix.kind == 'test_release' &&
startsWith(matrix.os, 'ubuntu')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- run: ./tools/cargo_publish.py
+ run: |
+ cd core
+ cargo publish
+ cd ../deno_typescript
+ sleep 30
+ cargo publish
+ cd ../cli
+ sleep 30
+ cargo publish
- name: Stop sccache
run: sccache --stop-server
diff --git a/tools/cargo_publish.py b/tools/cargo_publish.py
deleted file mode 100755
index b8fa1f037..000000000
--- a/tools/cargo_publish.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-import argparse
-from util import run, root_path
-
-
-def main():
- parser = argparse.ArgumentParser()
- parser.add_argument("--dry-run", action="store_true")
- args = parser.parse_args()
-
- cargo_publish = ["cargo", "publish"]
- if args.dry_run:
- cargo_publish += ["--dry-run"]
-
- os.chdir(os.path.join(root_path, "core"))
- run(cargo_publish)
-
- os.chdir(os.path.join(root_path, "deno_typescript"))
- run(cargo_publish)
-
- os.chdir(os.path.join(root_path, "cli"))
- run(cargo_publish)
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/tools/upload_docs.py b/tools/upload_docs.py
index b37ab4e96..70605dd4a 100755
--- a/tools/upload_docs.py
+++ b/tools/upload_docs.py
@@ -9,5 +9,5 @@ run([sys.executable, "tools/docs.py"])
os.chdir("target")
run([
"aws", "s3", "sync", "--include=typedoc", "--exclude=debug/*",
- "--exclude=release/*", ".", "s3://deno.land/"
+ "--exclude=package/*", "--exclude=release/*", ".", "s3://deno.land/"
])