Skip to content

testing ci publishing #29

testing ci publishing

testing ci publishing #29

Workflow file for this run

name: build
on:
push:
branches:
- master
tags:
- v*
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "18.15.0"
- run: npm ci
- run: npm run build
npm-release:
#only run this task for version-tagged releases
#if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "18.15.0"
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
#create GitHub release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: compile using bsc
run: npm run build
#upload package to GitHub release
- name: Upload GitHub Release Assets (./dist code)
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./dist/components/Promise.xml", "./dist/source/promises.brs", "./dist/source/promises.brs.map", "./dist/source/promises.d.bs"]'
- name: "Prepare package for ropm"
run: npx ts-node ./scripts/ropm-preprocess.ts
#create the npm package
- run: npm pack
# publish to npm
#- run: npm publish
#upload the tarball to GitHub release
- name: Upload GitHub Release Assets (npm package)
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./*.tgz"]'