File: release.yml

package info (click to toggle)
pyeconet 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 248 kB
  • sloc: python: 1,083; makefile: 3
file content (75 lines) | stat: -rw-r--r-- 2,326 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Gets semantic release info
        id: semantic_release_info
        uses: jossef/action-semantic-release-info@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}

      - name: Update Version and Commit
        if: ${{steps.semantic_release_info.outputs.version != ''}}
        run: |
          echo "Version: ${{steps.semantic_release_info.outputs.version}}"
          sed -i "s/VERSION = \".*\"/VERSION = \"${{steps.semantic_release_info.outputs.version}}\"/g" setup.py
          git config --local user.email "6432770+w1ll1am23@users.noreply.github.com"
          git config --local user.name "William Scanlon"
          git add -A
          git commit -m "chore: bumping version to ${{steps.semantic_release_info.outputs.version}}"
          git tag ${{ steps.semantic_release_info.outputs.git_tag }}

      - name: Push changes
        if: ${{steps.semantic_release_info.outputs.version != ''}}
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ github.token }}
          tags: true

      - name: Create GitHub Release
        if: ${{steps.semantic_release_info.outputs.version != ''}}
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          tag_name: ${{ steps.semantic_release_info.outputs.git_tag }}
          release_name: ${{ steps.semantic_release_info.outputs.git_tag }}
          body: ${{ steps.semantic_release_info.outputs.notes }}
          draft: false
          prerelease: false

      - name: Set up Python 3.14
        uses: actions/setup-python@v1
        with:
          python-version: 3.14

      - name: Install pypa/build
        run: >-
          python -m
          pip install
          build
          --user

      - name: Build a binary wheel and a source tarball
        run: >-
          python -m
          build
          --sdist
          --wheel
          --outdir dist/
          .

      - name: Publish distribution 📦 to PyPI
        if: ${{steps.semantic_release_info.outputs.version != ''}}
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          password: ${{ secrets.PYPI_API_TOKEN }}