Skip to content

chore(release): 1.15.15 #568

chore(release): 1.15.15

chore(release): 1.15.15 #568

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- "main"
- "develop"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches: [main, develop]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
build:
name: Build Release
needs:
- pre-commit
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pages: write
steps:
- uses: actions/checkout@v4
with:
#Very Important semantic-release won't trigger a tagged
#build if this is not set false
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1
- name: Cache pysnmp
id: cache-pysnmp
uses: actions/cache@v4
with:
path: .pycache/
key: ${{ runner.os }}-pysnmp
- run: poetry install
#Build and index
- run: mkdir -p output/asn1
- run: make index
- uses: actions/upload-artifact@v4
with:
path: log/
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.6.3
# - name: Upload
# run: |
# mkdir /tmp/package
# mkdir /tmp/index
# mkdir /tmp/origin
# echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
# VERSION="$(echo "$GITHUB_REF" | cut -d / -f 3)"
# helm package mibserver -d /tmp/package
# gh release upload "$VERSION" /tmp/package/*
# helm repo index /tmp/package --url https://github.com/pysnmp/mibs/releases/download/"$VERSION"
# cp /tmp/package/index.yaml ./output
- name: Deploy - GH-PAGES
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
keep_files: true
#Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/pysnmp/mibs/container
tags: |
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
type=sha,format=long
- name: Build and push action
id: docker_action_build
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Semantic Release
uses: cycjimmy/[email protected]
with:
semantic_version: 17
extra_plugins: |
@semantic-release/exec
@semantic-release/git
@google/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.SEMREL_TOKEN }} #
update-semver:
name: Move Respository semver tags
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haya14busa/action-update-semver@v1