Skip to content

urlr-python 1.0.0

urlr-python 1.0.0 #19

Workflow file for this run

name: API Clients
on:
push:
branches:
- main
jobs:
build-javascript:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and Deploy πŸš€
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run generate-javascript
git clone https://[email protected]/URLR/urlr-javascript clones/urlr-javascript &> /dev/null
rsync -avI --delete --exclude='.git/' clients/urlr-javascript/ clones/urlr-javascript
cd clones/urlr-javascript
git status --verbose
if [ -n "$(git status --porcelain)" ]; then
git config --global user.email "[email protected]"
git config --global user.name "Hugo Posnic"
git add .
git commit --message "Deploying from urlr/api-clients-generation@${GITHUB_SHA::8}"
PACKAGE_VERSION=$(awk '/- Package version:/{print $NF}' README.md)
git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true
git push --tags origin main
else
echo " No changes, skipping."
fi
build-php:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and Deploy πŸš€
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run generate-php
git clone https://[email protected]/URLR/urlr-php clones/urlr-php &> /dev/null
rsync -avI --delete --exclude='.git/' clients/urlr-php/ clones/urlr-php
cd clones/urlr-php
git status --verbose
if [ -n "$(git status --porcelain)" ]; then
git config --global user.email "[email protected]"
git config --global user.name "Hugo Posnic"
git add .
git commit --message "Deploying from urlr/api-clients-generation@${GITHUB_SHA::8}"
PACKAGE_VERSION=$(awk '/- Package version:/{print $NF}' README.md)
git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true
git push --tags origin main
else
echo " No changes, skipping."
fi
build-python:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and Deploy πŸš€
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run generate-python
git clone https://[email protected]/URLR/urlr-python clones/urlr-python &> /dev/null
rsync -avI --delete --exclude='.git/' clients/urlr-python/ clones/urlr-python
cd clones/urlr-python
git status --verbose
if [ -n "$(git status --porcelain)" ]; then
git config --global user.email "[email protected]"
git config --global user.name "Hugo Posnic"
git add .
git commit --message "Deploying from urlr/api-clients-generation@${GITHUB_SHA::8}"
PACKAGE_VERSION=$(awk '/- Package version:/{print $NF}' README.md)
git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true
git push --tags origin main
else
echo " No changes, skipping."
fi