Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test fix 1 #78

Closed
wants to merge 12 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 26 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: Release Package to PyPI
name: Do GitHub release and publish to PyPI
on:
release:
types: [published]
workflow_dispatch: null

env:
PACKAGE_DIR: equinix_metal
DIST_DIR: equinix_metal/dist
PYTHON_VERSION: 3.8
jobs:
build:
release:
name: Build and publish package
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -25,6 +27,26 @@ jobs:
run: |
python -m pip install --upgrade build

- name: Install dependencies
working-directory: ${{ env.PACKAGE_DIR }}
run: |
python -m pip install pyaml

- name: Do GitHub release
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 19.0.5
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: equinix-labs@auto-commit-workflow
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: equinix-labs@auto-commit-workflow
GIT_COMMITTER_EMAIL: [email protected]

- name: Build package
working-directory: ${{ env.PACKAGE_DIR }}
run: |
Expand All @@ -37,4 +59,3 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ${{ env.DIST_DIR }}


41 changes: 41 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"branches": [
"main"
],
"ci": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "echo -n '${nextRelease.version}' > version && make generate"
}
],
[
"@semantic-release/git",
{
"message": "ci: regenerate code for version ${nextRelease.version} triggered by ${process.env.RELEASE_REQUESTER}",
"assets": ["."]
}
]
]
}
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PACKAGE_VERSION=0.6.0
VERSION_FILE=version
PACKAGE_VERSION := $(shell cat ${VERSION_FILE})

SPEC_PATCHED_FILE=./metal_openapi.fixed.yaml

OPENAPI_CODEGEN_TAG=v7.0.0
OPENAPI_CODEGEN_IMAGE=openapitools/openapi-generator-cli:${OPENAPI_CODEGEN_TAG}
CURRENT_UID := $(shell id -u)
Expand Down Expand Up @@ -50,6 +52,6 @@ generate: clean patch-spec
--git-repo-id ${GIT_REPO} \
--git-user-id ${GIT_ORG} \
--http-user-agent ${USER_AGENT} \
--additional-properties=packageName=${PACKAGE_NAME},packageVersion=${PACKAGE_VERSION}
--additional-properties=packageName=equinix_metal_t0mk,packageVersion=${PACKAGE_VERSION}
rm -rf equinix_metal/.github
rm -rf equinix_metal/.gitlab-ci.yml
11 changes: 11 additions & 0 deletions deltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fdsfSF
sf
dsf
sdf
dsf
s
f
sdf
dsf
dsf
sdf
Loading
Loading