semtag 0.2.5__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- name: Publish to PyPI
1
+ name: Release
2
2
 
3
3
  on:
4
4
  push:
@@ -8,17 +8,13 @@ on:
8
8
  - '[0-9]+\.[0-9]+\.[0-9]+-*'
9
9
 
10
10
  jobs:
11
- build-and-publish:
11
+ build:
12
12
  runs-on: ubuntu-latest
13
- permissions:
14
- contents: write # Required for creating GitHub releases
15
- id-token: write # Required for trusted publishing
16
-
17
13
  steps:
18
14
  - name: Checkout code
19
15
  uses: actions/checkout@v4
20
16
  with:
21
- fetch-depth: 0 # Required for setuptools_scm to get git history
17
+ fetch-depth: 0
22
18
 
23
19
  - name: Set up Python
24
20
  uses: actions/setup-python@v5
@@ -30,17 +26,50 @@ jobs:
30
26
  python -m pip install --upgrade pip
31
27
  pip install build twine
32
28
 
29
+ # - name: Install runtime deps
30
+ # run: pip install -r requirements.txt
31
+
33
32
  - name: Build package
34
33
  run: python -m build
35
34
 
36
35
  - name: Check package
37
36
  run: twine check dist/*
38
37
 
39
- # Use the official PyPI publish action
38
+ - name: Upload dist artifacts
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: dist
42
+ path: dist/*
43
+
44
+ publish-pypi:
45
+ name: Publish to PyPI
46
+ runs-on: ubuntu-latest
47
+ needs: build
48
+ permissions:
49
+ id-token: write
50
+ steps:
51
+ - name: Download dist artifacts
52
+ uses: actions/download-artifact@v4
53
+ with:
54
+ name: dist
55
+ path: dist
56
+
40
57
  - name: Publish to PyPI
41
58
  uses: pypa/gh-action-pypi-publish@release/v1
42
59
 
43
- # GH Release
60
+ publish-github:
61
+ name: Publish GitHub Release
62
+ runs-on: ubuntu-latest
63
+ needs: build
64
+ permissions:
65
+ contents: write
66
+ steps:
67
+ - name: Download dist artifacts
68
+ uses: actions/download-artifact@v4
69
+ with:
70
+ name: dist
71
+ path: dist
72
+
44
73
  - name: Create GitHub Release
45
74
  uses: softprops/action-gh-release@v1
46
75
  with:
@@ -48,18 +77,19 @@ jobs:
48
77
  files: |
49
78
  dist/*
50
79
 
51
- ### Homebrew tap update
52
- update-homebrew-tap:
53
- name: Update Homebrew tap
80
+ publish-homebrew:
81
+ name: Publish Homebrew tap
54
82
  runs-on: ubuntu-latest
55
- needs: build-and-publish
83
+ needs:
84
+ - publish-pypi
85
+ - publish-github
56
86
  permissions:
57
87
  contents: write
58
88
  env:
59
89
  FORMULA_PATH: tap/Formula/semtag.rb
60
90
  TEMPLATE_PATH: tap/Templates/semtag.template
61
91
  steps:
62
- - name: Checkout this repo
92
+ - name: Checkout semtag repo
63
93
  uses: actions/checkout@v4
64
94
  with:
65
95
  repository: mateuszmikrut/semtag
@@ -69,29 +99,25 @@ jobs:
69
99
  uses: actions/checkout@v4
70
100
  with:
71
101
  repository: mateuszmikrut/homebrew-tap
72
- token: ${{ secrets.HOMEBREW_TAP_TOKEN }} ## Add this to secrets
102
+ token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
73
103
  path: tap
74
104
 
75
- - name: Create a branch for the update
76
- working-directory: tap
77
- run: |
78
- set -euo pipefail
79
- git checkout -b bump-semtag-"${GITHUB_REF_NAME}"
80
-
105
+ # - name: Create a branch for the update
106
+ # working-directory: tap
107
+ # run: |
108
+ # set -euo pipefail
109
+ # git checkout -b bump-semtag-"${GITHUB_REF_NAME}"
81
110
 
82
111
  - name: Update formula
83
- # no working directory, as I need both repos
84
112
  run: |
85
113
  set -euo pipefail
86
114
  TAG="${GITHUB_REF_NAME}"
87
115
  VERSION="${TAG#v}"
88
116
  TARBALL_URL="https://github.com/mateuszmikrut/semtag/archive/refs/tags/${TAG}.tar.gz"
89
117
 
90
- # Get tarball SHA
91
118
  curl -sL "$TARBALL_URL" -o semtag.tar.gz
92
119
  TARBALL_SHA=$(shasum -a 256 semtag.tar.gz | awk '{print $1}')
93
120
 
94
-
95
121
  RESOURCES=""
96
122
  for pkg in $(grep -vE '^#|^$' semtag/requirements.txt ); do
97
123
  name=$(echo "$pkg" | sed 's/[>=<].*//')
@@ -109,7 +135,11 @@ jobs:
109
135
 
110
136
  RESOURCES="$(printf "%s%s\n resource \"%s\" do\n url \"%s\"\n sha256 \"%s\"\n end\n\n" "$RESOURCES" "" "$name" "$url" "$sha")"
111
137
  done
138
+
112
139
  export RESOURCES
140
+ export TARBALL_URL
141
+ export TARBALL_SHA
142
+ export VERSION
113
143
 
114
144
  envsubst < "${{ env.TEMPLATE_PATH }}" > "${{ env.FORMULA_PATH }}"
115
145
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semtag
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A tool for managing semantic version tags in git repositories
5
5
  Author-email: Mateusz Mikrut <mateusz.mikrut@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semtag
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A tool for managing semantic version tags in git repositories
5
5
  Author-email: Mateusz Mikrut <mateusz.mikrut@gmail.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes