Skip to content

chore(deps): bump actions/checkout from 4 to 5 #290

chore(deps): bump actions/checkout from 4 to 5

chore(deps): bump actions/checkout from 4 to 5 #290

Workflow file for this run

name: 'Publish'
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: write
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
fetch-depth: 100
fetch-tags: true
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install lint
shell: bash
run: |
npm install -g @commitlint/cli @commitlint/config-conventional
if [ ! -f "commitlint.config.js" ]; then
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
fi
- name: Lint Commit Message
if: github.event_name == 'push'
shell: bash
run: commitlint --from=HEAD~2 --verbose
- name: Lint Pull Request
if: github.event_name == 'pull_request'
shell: bash
run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: "Get Previous tag"
id: previoustagold
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Conventional Changelog Action
id: changelog
if: github.ref_name == 'main'
uses: TriPSs/conventional-changelog-action@v6
with:
github-token: ${{ github.token }}
git-url: ${{ github.server_url != 'https://github.com' && 'git.yusufali.ca' || 'github.com' }}
tag-prefix: ""
output-file: false
skip-version-file: true
skip-commit: true
skip-ci: false
skip-tag: ${{ github.ref_name != 'main' }}
fallback-version: ${{ steps.previoustagold.outputs.tag }}
codepublish:
runs-on: ubuntu-latest
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
fetch-tags: true
- name: Install git
if: github.ref_name == 'main' && github.server_url != 'https://github.com'
shell: bash
env:
TOKEN: ${{ secrets.GIT_SERVC_TOKEN }}
URL: github.com/${{ github.repository }}.git
run: |
sudo apt-get install -y git
git checkout main
git push https://drgroot:${TOKEN}@${URL} main
git push https://drgroot:${TOKEN}@${URL} --tags
dockerpublish:
runs-on: ubuntu-latest
needs: version
steps:
- name: Check out code
uses: actions/checkout@v5
with:
submodules: true
fetch-tags: true
- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.1
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.ref_name == 'main'
with:
username: ${{ secrets.DOCKER_PUBLIC_USERNAME }}
password: ${{ secrets.DOCKER_PUBLIC_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.ref_name == 'main' }}
tags: yusufali/servc:latest,yusufali/servc:${{ steps.previoustag.outputs.tag }}
packagepublish:
runs-on: ubuntu-latest
needs: version
steps:
- name: Check out code
uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.1
- uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Setup Version
env:
TAG: ${{ steps.previoustag.outputs.tag }}
run: |
sed -i "s/version = .*/version = \"$TAG\"/g" pyproject.toml
cat pyproject.toml
- name: Build package
run: python -m build
- name: Publish package
if: github.ref_name == 'main'
run: |
unset DBUS_SESSION_BUS_ADDRESS
python -m twine upload --verbose dist/* --non-interactive -u__token__ -p${{ secrets.PYPI_TOKEN }}