Skip to content

S3 Folder Sync

S3 Folder Sync #6

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: S3 Folder Sync
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
name: Build RPM
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
node-version: [18.18.2]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y rpm dos2unix
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: NPM Install
run: npm ci
- name: NPM - Build RPM
run: npm run-script build-rpm
- name: Get package.json version
id: set_var
run: |
content=`cat ./package.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=packageJson::$content"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./dist/rpms/*.rpm
tag_name: ${{fromJson(steps.set_var.outputs.packageJson).version}}