Node.js AntPickax CI #117
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
# | |
# CHMPX | |
# | |
# Copyright 2020 Yahoo Japan corporation. | |
# | |
# CHMPX is inprocess data exchange by MQ with consistent hashing. | |
# CHMPX is made for the purpose of the construction of | |
# original messaging system and the offer of the client | |
# library. | |
# CHMPX transfers messages between the client and the server/ | |
# slave. CHMPX based servers are dispersed by consistent | |
# hashing and are automatically laid out. As a result, it | |
# provides a high performance, a high scalability. | |
# | |
# 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: | |
# [NOTE] | |
# We plan to update to ubuntu-latest (22.04) soon. | |
# Right now I am forced to use 20.04 as there are no relevant packages yet. | |
# | |
runs-on: ubuntu-20.04 | |
strategy: | |
# | |
# do not stop jobs automatically if any of the jobs fail | |
# | |
fail-fast: false | |
matrix: | |
node-version: [14, 16, 18] | |
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 | |
# |