Update configure-aws-credentials to v4 #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish npm package | |
on: | |
push: | |
tags: | |
- "v*.*" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: deploy | |
container: ghcr.io/r-wasm/webr-flang:main | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Set npm dist-tag to "next" if pre-release version | |
if: contains(github.ref_name, '-dev') || contains(github.ref_name, '-rc') | |
run: echo "DIST_TAG=next" >> $GITHUB_ENV | |
- name: Set the webR CDN URL as the BASE_URL | |
run: echo "BASE_URL=https://webr.r-wasm.org/${{ github.ref_name }}/" > "$HOME/.webr-config.mk" | |
- name: Configure webR for flang | |
run: ./configure | |
- name: Copy flang into webR tree | |
run: | | |
cp -r /opt/flang/wasm . | |
cp -r /opt/flang/host . | |
cp /opt/flang/emfc ./host/bin/emfc | |
- name: Setup Emscripten PATH | |
run: echo "/opt/emsdk:/opt/emsdk/upstream/emscripten" >> $GITHUB_PATH | |
- name: Set Emscripten EM_NODE_JS | |
run: echo "EM_NODE_JS=$(which node)" >> $GITHUB_ENV | |
- name: Build all optional wasm libs | |
env: | |
EMSDK: /opt/emsdk | |
run: cd libs && make all | |
- name: Build webR | |
env: | |
EMSDK: /opt/emsdk | |
run: make | |
shell: bash | |
- run: cd src && make publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |