mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-29 23:10:07 +00:00
34 lines
966 B
YAML
34 lines
966 B
YAML
name: NPM Publish
|
|
|
|
on:
|
|
create:
|
|
tags:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
deno: ["v1.x"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: denoland/setup-deno@main
|
|
with:
|
|
deno-version: ${{ matrix.deno }}
|
|
# Taken from: https://github.com/denoland/dnt#github-actions---npm-publish-on-tag
|
|
- name: Get tag version
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
id: get_tag_version
|
|
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- name: npm build
|
|
run: deno run -A ./dnt.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
|
|
- name: npm publish
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: cd npm && npm publish
|