Skip to content

Commit 1f83691

Browse files
committed
update release
1 parent 2903a42 commit 1f83691

3 files changed

Lines changed: 52 additions & 12 deletions

File tree

.github/workflows/publish-to-test-pypi.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Deployment
1+
name: Deployment
22

33
# The deployment workflow should only run when changes are merged into the `main` branch.
44
# Since a branch protection rule prevents directly pushing to `main` this workflow will
@@ -7,15 +7,9 @@ on:
77
push:
88
branches:
99
- main
10-
- feature/grid
1110

1211
# Allow the workflow to be manually triggered from the Actions tab.
1312
workflow_dispatch:
14-
inputs:
15-
tag_name:
16-
description: 'If you want to run a release, type an existing or new tag (eg. v1.2.0)'
17-
required: false
18-
default: ''
1913

2014
jobs:
2115
# Build and test the distribution before deploying to the various platforms. This allows
@@ -147,9 +141,9 @@ jobs:
147141
runs-on: ubuntu-latest
148142

149143
# Require a tag push to publish a release distribution.
150-
if: >
151-
startsWith(github.ref, 'refs/tags/')
152-
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '')
144+
# if: >
145+
# startsWith(github.ref, 'refs/tags/')
146+
# || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '')
153147

154148
# The distribution will only be published if the tests have passed.
155149
needs:
@@ -180,7 +174,9 @@ jobs:
180174
runs-on: ubuntu-latest
181175

182176
# GitHub releases are only uploaded for release (tagged) distributions.
183-
needs: [deploy-release]
177+
needs:
178+
- deploy-release
179+
- build
184180

185181
permissions:
186182
contents: write # IMPORTANT: mandatory for making GitHub Releases
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: update-version
2+
3+
# The deployment workflow should only run when changes are merged into the `main` branch.
4+
# Since a branch protection rule prevents directly pushing to `main` this workflow will
5+
# only run on a successful merge request.
6+
on:
7+
# Allow the workflow to be manually triggered from the Actions tab.
8+
workflow_dispatch:
9+
inputs:
10+
tag_name:
11+
description: 'If you want to update the version and release, type an existing or new version tag (eg. 1.2.0)'
12+
required: false
13+
default: ''
14+
15+
jobs:
16+
17+
update-version:
18+
name: Update Version
19+
runs-on: ubuntu-latest
20+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '' }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Update version in pyproject.toml
30+
run: |
31+
sed -i "s/^version = .*/version = \"${{ github.event.inputs.tag_name }}\"/" pyproject.toml
32+
33+
- name: Update version in setup.cfg
34+
run: |
35+
sed -i "s/^version = .*/version = ${{ github.event.inputs.tag_name }}/" setup.cfg
36+
37+
- name: Commit and push version update
38+
run: |
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
git add pyproject.toml setup.cfg
42+
git commit -m "chore: update version to ${{ github.event.inputs.tag_name }}"
43+
git push
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/hecdss/gridded_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# import pandas as pd
22
import numpy as np
33
import math
4-
import time
54

65
NULL_INT = -3.4028234663852886e+38
76

0 commit comments

Comments
 (0)