Skip to content

Workflow file for this run

name: Build contribution-samples
defaults:
run:
working-directory: contribution-samples
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.14.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: NPM Install
run: npm install
- name: Build
run: npm run build
- name: Archive contribution sample URCap
uses: actions/upload-artifact@v4
with:
name: contribution-samples-urcap
path: ${{ github.workspace }}/contribution-samples/target/
overwrite: true
compression-level: 0
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ github.workspace }}/contribution-samples/target/contribution-samples.urcapx
asset_name: contribution-samples.urcapx
asset_content_type: application/tar+gzip