Node.js AntPickax CI #173
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
# | |
# K2HDKC | |
# | |
# Copyright 2020 Yahoo Japan corporation. | |
# | |
# K2HDKC is k2hash based distributed KVS cluster. | |
# K2HDKC uses K2HASH, CHMPX, FULLOCK libraries. K2HDKC supports | |
# distributed KVS cluster server program and client libraries. | |
# | |
# For the full copyright and license information, please view | |
# the license file that was distributed with this source code. | |
# | |
# AUTHOR: Takeshi Nakatani | |
# CREATE: Wed, Nov 18 2020 | |
# REVISION: 1.0 | |
# | |
#------------------------------------------------------------------------------------ | |
# Github Actions | |
#------------------------------------------------------------------------------------ | |
name: Node.js AntPickax CI | |
# | |
# Events | |
# | |
on: | |
push: | |
pull_request: | |
# | |
# CRON event is fire on every sunday(UTC). | |
# | |
schedule: | |
- cron: '0 15 * * 0' | |
# | |
# Jobs | |
# | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
# | |
# do not stop jobs automatically if any of the jobs fail | |
# | |
fail-fast: false | |
matrix: | |
node-version: [18, 20] | |
steps: | |
# | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your | |
# job can access it | |
# | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# | |
# Set environments from secrets | |
# | |
# [NOTE] Secrets | |
# Use Secrets of organization or repository as parameters to | |
# pass to nodejs_helper.sh for building and packaging, . | |
# | |
# The available Secret variables are listed below: | |
# NODEJS_TYPE_VARS_FILE : specify custom variables file | |
# * NPM_TOKEN : The token for publishing to npm | |
# FORCE_PUBLISHER : nodejs major version to publish packages | |
# USE_PACKAGECLOUD_REPO : true means using pacakgecloud.io repo, false is not using | |
# PACKAGECLOUD_OWNER : owner name as a pat of path to packagcloud.io for downloading | |
# PACKAGECLOUD_DOWNLOAD_REPO : repo name as a pat of path to packagcloud.io for downloading | |
# | |
# "NPM_TOKEN" is required variable to publish the package. | |
# | |
- name: Set environments from secrets | |
run: | | |
echo "ENV_NODEJS_TYPE_VARS_FILE=${{ secrets.NODEJS_TYPE_VARS_FILE }}" >> "${GITHUB_ENV}" | |
echo "ENV_NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> "${GITHUB_ENV}" | |
echo "ENV_FORCE_PUBLISHER=${{ secrets.FORCE_PUBLISHER }}" >> "${GITHUB_ENV}" | |
echo "ENV_USE_PACKAGECLOUD_REPO=${{ secrets.USE_PACKAGECLOUD_REPO }}" >> "${GITHUB_ENV}" | |
echo "ENV_PACKAGECLOUD_OWNER=${{ secrets.PACKAGECLOUD_OWNER }}" >> "${GITHUB_ENV}" | |
echo "ENV_PACKAGECLOUD_DOWNLOAD_REPO=${{ secrets.PACKAGECLOUD_DOWNLOAD_REPO }}" >> "${GITHUB_ENV}" | |
# | |
# Run building and packaging helper | |
# | |
- name: Run building and packaging | |
run: | | |
/bin/sh -c "$GITHUB_WORKSPACE/.github/workflows/nodejs_helper.sh -node ${{ matrix.node-version }}" | |
# | |
# Local variables: | |
# tab-width: 4 | |
# c-basic-offset: 4 | |
# End: | |
# vim600: expandtab sw=4 ts=4 fdm=marker | |
# vim<600: expandtab sw=4 ts=4 | |
# |