Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/scripts/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ local_sdk_version_patch=$(echo $local_sdk_version | cut -d '.' -f 3)
new_sdk_version_minor=$(( local_sdk_version_minor + 1 ))
new_sdk_version="$local_sdk_version_major.$new_sdk_version_minor.0"

branch_name="autobuild-$new_sdk_version"
git branch -m $branch_name

# Update osc-api version
curl --retry 10 -o "${root}/osc_sdk_python/resources/outscale.yaml" "https://raw.githubusercontent.com/outscale/osc-api/refs/tags/${osc_api_version}/outscale.yaml"
git add "${root}/osc_sdk_python/resources/outscale.yaml"
Expand All @@ -30,13 +27,4 @@ for f in "$root/README.md" "$root/osc_sdk_python/VERSION"; do
git add "$f"
done

uv version $(cat VERSION)

# Setup git && commit
git config user.name "Outscale Bot"
git config user.email "opensource+bot@outscale.com"
commit_msg="πŸ”– release: osc-sdk-python v$new_sdk_version

- SDK update for Outscale API $osc_api_version
"
git commit -sm "$commit_msg"
uv version $(cat osc_sdk_python/VERSION)
29 changes: 0 additions & 29 deletions .github/scripts/release-pr.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .github/scripts/release-push.sh

This file was deleted.

33 changes: 24 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
name: osc-sdk-python release build

on:
workflow_dispatch:
inputs:
api_version:
description: 'Outscale API version'
required: true

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
auto-build:
environment: auto-build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: chainguard-dev/actions/setup-gitsign@main
- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
- name: Set up Python
run: uv python install
- name: Initialize submodules
run: make init
- name: Build release
run: .github/scripts/release-build.sh ${{ github.event.inputs.api_version }}
- name: push release branch
run: .github/scripts/release-push.sh
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: create pull request
run: .github/scripts/release-pr.sh ${{ github.event.inputs.api_version }}
- name: Get SDK version
id: get-sdk-version
run: |
echo "sdk_version=$(cat osc_sdk_python/VERSION)" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8.1.0
with:
committer: "Outscale Bot <opensource+bot@outscale.com>"
author: "Outscale Bot <opensource+bot@outscale.com>"
commit-message: "πŸ”– release: osc-sdk-python v${{ env.sdk_version }}"
body: |
Automatic build of SDK v${{ env.sdk_version }} version based on Outscale API ${{ env.api_version }}.
title: "SDK v${{ env.sdk_version }}"
token: "${{ env.token }}"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
sdk_version: ${{ steps.get-sdk-version.outputs.sdk_version }}
api_version: ${{ github.event.inputs.api_version }}
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}