Skip to content

bump change-i18n-lib library version to fixed 0.17.3 and cleanup tran… #41

bump change-i18n-lib library version to fixed 0.17.3 and cleanup tran…

bump change-i18n-lib library version to fixed 0.17.3 and cleanup tran… #41

Workflow file for this run

name: NodeJS with Gulp
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Add package-version to environment
run: node -p -e '`npm_package_version=${require("./package.json").version}`' >> $GITHUB_ENV
- name: Build
run: |
npm install
gulp
- name: Create package-version artifact
run: node -p -e '`${require("./package.json").version}`' >> build/version.txt
- name: Package-version-to-git-tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.npm_package_version }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: build/*
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v5
with:
name: build-artifact
- name: Set tagname
shell: bash
run: |
version=`cat version.txt`
echo "TAGNAME=$version" >> $GITHUB_ENV
- name: Flatten directory structure
shell: bash
run: |
mkdir -p flattened
for lang_dir in */; do
lang="${lang_dir%/}"
[ "$lang" = "flattened" ] && continue
[ -d "$lang" ] || continue
for file in "$lang"/*; do
[ -f "$file" ] || continue
filename=$(basename "$file")
extension="${filename##*.}"
basename="${filename%.*}"
cp "$file" "flattened/${basename}.${lang}.${extension}"
done
done
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.TAGNAME }}
name: Release v${{ env.TAGNAME }}
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
files: flattened/*