forked from cmake-lint/cmake-lint
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install just | ||
uses: extractions/setup-just@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build release distributions | ||
run: | | ||
just create-venv | ||
just install | ||
just build | ||
- name: upload dists | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
publish-pypi: | ||
runs-on: ubuntu-latest | ||
name: Publish to PyPI | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: | ||
- release-build | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Retrieve release distributions | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
- name: Publish release distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
publish-release: | ||
runs-on: ubuntu-latest | ||
name: Publish to GitHub | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: | ||
- release-build | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
- name: Get tag name | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Publish to GitHub | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: dist/* | ||
tag_name: ${{ env.RELEASE_VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- id: cmakelint | ||
name: CMake Lint | ||
description: This hook lints CMake files for style issues. | ||
entry: cmakelint | ||
language: python | ||
types: [cmake] | ||
- id: cmakelint | ||
name: CMake Lint | ||
description: This hook lints CMake files for style issues. | ||
entry: cmakelint | ||
language: python | ||
types: [cmake] |
This file was deleted.
Oops, something went wrong.