Skip to content

chore: bump version to v2.14.19 #102

chore: bump version to v2.14.19

chore: bump version to v2.14.19 #102

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
build:
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'userbotindo/Anjani'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get release tag
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION_TAG }}
name: Anjani ${{ env.VERSION_TAG }}
draft: true
prerelease: false
publish-pypi:
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'userbotindo/Anjani'
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.4.0"
- name: Build
run: |
poetry build
- name: Publish Package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
publish-ghcr:
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'userbotindo/Anjani'
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# https://github.com/docker/login-action
- name: Log into registry ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.USERBOTINDO_ACCESS_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
USERBOTINDO_ACCESS_TOKEN=${{ secrets.USERBOTINDO_ACCESS_TOKEN }}