Merge pull request #109 from che-incubator/che-22188 #43
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
name: Publish Maven and NPM Artifacts | |
on: | |
push: | |
branches: | |
master | |
jobs: | |
build_deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.19.0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Update version | |
run: | | |
pip install --user yq | |
export PATH="/home/runner/.local/bin:$PATH" | |
./update-versions.sh | |
- name: Make release commit | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "CI: Update release versions" -a | |
- name: Maven install | |
run: | | |
mkdir -p ~/.m2 | |
mvn --settings settings.xml clean install -Dmaven.wagon.http.pool=false -DskipITs | |
- name: Maven Deploy | |
run: | | |
mkdir -p ~/.m2 | |
mvn --settings settings.xml clean deploy -Dmaven.wagon.http.pool=false -DskipITs | |
env: | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: x-access-token | |
- name: NPM - Set auth token | |
run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> ./javascript/src/typescript/.npmrc | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: NPM Publish | |
working-directory: ./javascript/src/typescript | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
# npm uses the NODE_AUTH_TOKEN environment variable | |
run: npm run publish:next | |
- name: Make release commit | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "CI: Update javascript telemetry client version" -a | |
- name: Push release commits | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'master' |