Update dependencies to latest versions. (#187) #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: Release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Print Node.js version before setting the version 16 | |
run: node -v | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Print Node.js version after setting the version 16 | |
run: node -v | |
- name: Get the version | |
id: get-version | |
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | |
- name: Install dependencies | |
run: | | |
npm install | |
sudo apt-get -y install llvm | |
- name: Build CLI karel | |
run: | | |
npm run build:bundle | |
tar cJf dist/karel.js.tar.xz '--transform=s/dist\///' dist/*.js dist/*.node | |
- name: Build distributable .zip | |
run: | | |
zip --recurse-paths dist/karel.zip \ | |
cmd/ css/ gramaticas/ img/ js/ lib/ manual/ LICENSE ayuda.html \ | |
sandbox.html README.md index.html | |
- name: Build C++ karel | |
run: | | |
(cd cpp && make karel) | |
- name: Create Release | |
id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get-version.outputs.version }} | |
release_name: ${{ steps.get-version.outputs.version }} | |
draft: false | |
prerelease: false | |
- name: Upload karel.zip Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ./dist/karel.zip | |
asset_name: karel.zip | |
asset_content_type: application/octet-stream | |
- name: Upload karel.js.tar.xz Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ./dist/karel.js.tar.xz | |
asset_name: karel.js.tar.xz | |
asset_content_type: application/octet-stream | |
- name: Upload karel Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ./cpp/karel | |
asset_name: karel | |
asset_content_type: application/octet-stream |