-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: Refactor release pipelines, use PyPi trusted publishing
- Loading branch information
Showing
5 changed files
with
201 additions
and
227 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,67 @@ | ||
name: 'Release: esbonio' | ||
on: | ||
push: | ||
branches: | ||
- release | ||
paths: | ||
- 'lib/esbonio/**' | ||
|
||
jobs: | ||
release: | ||
name: esbonio release | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/esbonio | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: | | ||
sudo apt update | ||
sudo apt install pandoc | ||
python --version | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox bump2version towncrier docutils | ||
name: Setup Environment | ||
- run: | | ||
set -e | ||
./scripts/make-release.sh lsp | ||
name: Set Version | ||
id: info | ||
- name: Package | ||
run: | | ||
cd lib/esbonio | ||
python -m tox -e pkg | ||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: 'dist' | ||
path: lib/esbonio/dist | ||
|
||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: lib/esbonio/dist/ | ||
|
||
- name: Create Release | ||
run: | | ||
gh release create "${RELEASE_TAG}" \ | ||
--title "Esbonio Language Server v${VERSION} - ${RELEASE_DATE}" \ | ||
-F lib/esbonio/.changes.html \ | ||
./lib/esbonio/dist/* | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
name: 'Release: esbonio-extensions' | ||
on: | ||
push: | ||
branches: | ||
- release | ||
paths: | ||
- 'lib/esbonio-extensions/**' | ||
|
||
jobs: | ||
release: | ||
name: "esbonio-extensions release" | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/esbonio-extensions | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: | | ||
sudo apt update | ||
sudo apt install pandoc | ||
python --version | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox bump2version towncrier docutils | ||
name: Setup Environment | ||
- run: | | ||
set -e | ||
./scripts/make-release.sh extensions | ||
name: Set Version | ||
id: info | ||
- name: Package | ||
run: | | ||
cd lib/esbonio-extensions | ||
python -m tox -e pkg | ||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: 'dist' | ||
path: lib/esbonio-extensions/dist | ||
|
||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: lib/esbonio-extensions/dist/ | ||
|
||
- name: Create Release | ||
run: | | ||
gh release create "${RELEASE_TAG}" \ | ||
--title "Esbonio Extensions v${VERSION} - ${RELEASE_DATE}" \ | ||
-F lib/esbonio-extensions/.changes.html \ | ||
./lib/esbonio-extensions/dist/* | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.