fix(deps): update ecosystem #264
This file contains hidden or 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: CICD | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Test | |
run: | | |
pip install -r requirements.txt | |
pip install . | |
pip install pytest | |
pytest | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.TOKEN }} | |
- name: Python Semantic Release | |
uses: python-semantic-release/python-semantic-release@master | |
id: semantic-release | |
with: | |
github_token: ${{ secrets.TOKEN }} | |
- name: Build | |
run: | | |
python3 -m pip install --upgrade build | |
python3 -m build | |
- name: Upload PYPI | |
if: steps.semantic-release.outputs.released == 'true' | |
run: | | |
python3 -m pip install twine==6.0.1 | |
python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | |
- name: Setup NODE | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
node-version: "20.x" | |
- name: Upload NPM | |
if: steps.semantic-release.outputs.released == 'true' | |
run: | | |
pwd | |
cd ${{ github.workspace }} | |
npm i | |
npm run json | |
jq '.version="${{steps.semantic-release.outputs.version}}"' package.json > temp && mv temp package.json | |
cat package.json | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Merge master -> next | |
if: github.ref == 'refs/heads/master' | |
uses: devmasx/merge-branch@master | |
with: | |
type: now | |
from_branch: master | |
target_branch: next | |
github_token: ${{ secrets.TOKEN }} | |
docker-build-squash-push: | |
uses: Geode-solutions/actions/.github/workflows/docker-build-squash-push.yml@master | |
if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' | |
with: | |
image_name: "vease-back" | |
tag: ${{ github.ref_name }} | |
secrets: | |
TOKEN: ${{secrets.GITHUB_TOKEN}} |