-
Notifications
You must be signed in to change notification settings - Fork 38
52 lines (52 loc) · 1.49 KB
/
release-test.yml
File metadata and controls
52 lines (52 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release Test
on:
pull_request:
# push:
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+' # like v1.0.0
jobs:
build-dist:
name: Package PyESAPI and Release
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Update pip
run: py -m pip install --upgrade pip
- name: Build package
run: |
py -m pip install --upgrade build
py -m build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: PyESAPI ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
files: dist/*
body: |
This is the official `${{ github.ref_name }}` release of the PyESAPI for use on Eclipse TBOX or VIC environment for Eclipse versions 15.1 and up.
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: build-dist
environment:
name: pypi
url: https://test.pypi.org/p/PyESAPI
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/