Skip to content

Commit 075ebd8

Browse files
authored
ci: write version to cloud2sql.com on tagging of stable releases (#28)
* ci: write version to cloud2sql.com on tagging of stable releases * resoto.com -> cloud2sql.com * Fix job name
1 parent 8d74337 commit 075ebd8

File tree

5 files changed

+73
-13
lines changed

5 files changed

+73
-13
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
id: version
1818
attributes:
1919
label: Version
20-
description: What version of Resoto are you running?
20+
description: What version of Cloud2SQL are you running?
2121
validations:
2222
required: true
2323
- type: input
@@ -52,4 +52,4 @@ body:
5252
- type: markdown
5353
attributes:
5454
value: |
55-
By submitting this bug report, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
55+
By submitting this bug report, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ contact_links:
44
url: https://discord.gg/someengineering
55
about: Chat with other users and the development team
66
- name: 📄 Documentation
7-
url: https://resoto.com/docs
7+
url: https://cloud2sql.com/docs
88
about: Read and search documentation

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ body:
2828
- type: markdown
2929
attributes:
3030
value: |
31-
By submitting this feature request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
31+
By submitting this feature request, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
- [ ] Add test coverage for new or updated functionality
1212
- [ ] Lint and test with `tox`
13-
- [ ] Document new or updated functionality (someengineering/resoto.com#XXXX)
13+
- [ ] Document new or updated functionality (someengineering/cloud2sql.com#XXXX)
1414

1515
# Issues Fixed
1616

@@ -21,4 +21,4 @@
2121

2222
# Code of Conduct
2323

24-
By submitting this pull request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
24+
By submitting this pull request, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/workflows/build_and_publish.yml

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check PR cloud2sql
22
on:
33
push:
44
tags:
5-
- "*.*.*"
5+
- '*.*.*'
66
branches:
77
- main
88
pull_request:
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
cloud2sql:
15-
name: "cloud2sql"
15+
name: 'cloud2sql'
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
@@ -42,11 +42,8 @@ jobs:
4242

4343
- name: Build a binary wheel and a source tarball
4444
run: >-
45-
python -m
46-
build
47-
--sdist
48-
--wheel
49-
--outdir dist/
45+
python -m build --sdist --wheel --outdir dist/
46+
5047
5148
- name: Publish distribution to PyPI
5249
if: github.ref_type == 'tag'
@@ -84,3 +81,66 @@ jobs:
8481
with:
8582
name: ${{ steps.pyinstaller.outputs.target }}
8683
path: dist/${{ steps.pyinstaller.outputs.target }}
84+
85+
docs:
86+
name: Update cloud2sql.com
87+
if: github.ref_type == 'tag'
88+
needs:
89+
- cloud2sql
90+
runs-on: ubuntu-latest
91+
92+
steps:
93+
- name: Get release tag and type
94+
id: release
95+
shell: bash
96+
run: |
97+
GITHUB_REF="${{ github.ref }}"
98+
tag=${GITHUB_REF##*/}
99+
echo "tag=${tag}" >> $GITHUB_OUTPUT
100+
101+
if [[ ${{ github.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
102+
echo "prerelease=false" >> $GITHUB_OUTPUT
103+
else
104+
echo "prerelease=true" >> $GITHUB_OUTPUT
105+
fi
106+
107+
- name: Check out someengineering/cloud2sql.com
108+
if: steps.release.outputs.prerelease == 'false'
109+
uses: actions/checkout@v3
110+
with:
111+
repository: someengineering/cloud2sql.com
112+
path: cloud2sql.com
113+
token: ${{ secrets.SOME_CI_PAT }}
114+
115+
- name: Update released version
116+
if: steps.release.outputs.prerelease == 'false'
117+
shell: bash
118+
working-directory: ./cloud2sql.com
119+
run: |
120+
echo $(jq '.version="${{ steps.release.outputs.tag }}" | .link="https://github.com/someengineering/cloud2sql/releases/tag/${{ steps.release.outputs.tag }}"' latestRelease.json) > latestRelease.json
121+
yarn format
122+
123+
- name: Create someengineering/cloud2sql.com pull request
124+
if: steps.release.outputs.prerelease == 'false'
125+
uses: peter-evans/create-pull-request@v4
126+
env:
127+
HUSKY: 0
128+
with:
129+
path: cloud2sql.com
130+
commit-message: 'chore: update Cloud2SQL version to ${{ steps.release.outputs.tag }}'
131+
title: 'chore: update Cloud2SQL version to ${{ steps.release.outputs.tag }}'
132+
body: |
133+
Updates Cloud2SQL version on cloud2sql.com to `${{ steps.release.outputs.tag }}`.
134+
labels: |
135+
🤖 bot
136+
branch: ${{ steps.release.outputs.tag }}
137+
delete-branch: true
138+
token: ${{ secrets.SOME_CI_PAT }}
139+
committer: C.K. <[email protected]>
140+
author: C.K. <[email protected]>
141+
142+
- name: Create release
143+
uses: ncipollo/release-action@v1
144+
with:
145+
token: ${{ secrets.GITHUB_TOKEN }}
146+
prerelease: ${{steps.release.outputs.prerelease}}

0 commit comments

Comments
 (0)