Skip to content

ci: fix deps.ts

ci: fix deps.ts #37

Workflow file for this run

name: Deno CI
on:
push:
branches:
- master
jobs:
test:
name: test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
env:
GH_ACTIONS: true
DENO_BUILD_MODE: release
V8_BINARY: true
steps:
- uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 1.x
- name: Tests
run: deno test --allow-read
bench:
name: benchmark
runs-on: ubuntu-latest
needs: test
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
continue-on-error: true
timeout-minutes: 25
env:
GH_ACTIONS: true
DENO_BUILD_MODE: release
V8_BINARY: true
steps:
- uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 1.x
- name: Run benchmarks
run: deno bench --unstable .
release:
name: Release
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
needs: test
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # get all commits, not just the last one
- name: Cache Rust artifacts
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 1.x
- name: build wasm
run: deno task wasmbuild
- name: Setup package.json
run: echo '{"name":"@denorg/scrypt","version":"0.0.0","publishConfig":{"access":"public"},"scripts":{"semantic-release":"semantic-release"},"repository":{"type":"git","url":"https://github.com/denorg/scrypt.git"},"author":"Denorg<[email protected]>","license":"MIT","bugs":{"url":"https://github.com/denorg/scrypt/issues"},"homepage":"https://denorg.github.io/scrypt/","devDependencies":{"semantic-release":"^19.0.3","@semantic-release/exec":"^6.0.3","@semantic-release/commit-analyzer":"^9.0.2","@semantic-release/github":"^8.0.5","@semantic-release/npm":"^9.0.1","@semantic-release/git":"^10.0.1","@semantic-release/release-notes-generator":"^10.0.3"}}' > package.json
- name: Install dependencies
run: npm install
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish on nest.land
continue-on-error: true # eggs fails if the version doesn't change
run: |
deno install --allow-write --allow-env --allow-read --allow-net --unstable https://x.nest.land/[email protected]/eggs.ts
eggs link ${{ secrets.NEST_TOKEN }}
eggs publish --yes --no-check
- name: Publish to JSR
run: |
sed -i "s/".*"; \/\/jsr: //" deps.ts # remove https imports
deno publish