Skip to content

Commit 1ded211

Browse files
authored
Update release.yml (#91)
1 parent ddf8d16 commit 1ded211

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,13 @@ jobs:
3636
git tag ${{ steps.latest.outputs.output }}
3737
git push origin ${{ steps.latest.outputs.output }}
3838
39-
- name: Generate release description
40-
run: |
41-
export checksum=$(sha256sum sqlc-gen-better-python.wasm | awk '{print $1}')
42-
export download_url="https://github.com/rayakame/sqlc-gen-better-python/releases/download/${{ steps.latest.outputs.output }}/sqlc-gen-better-python.wasm"
43-
44-
yq -i '.plugins[0].wasm.url = env(download_url)' .github/release_output_template.yaml
45-
yq -i '.plugins[0].wasm.sha256 = env(checksum)' .github/release_output_template.yaml
46-
47-
# Create the release body with the warning message at the top
48-
echo "> [!WARNING]" > release_body.md
49-
echo "> Every Release before \`v1.0.0\`, including this one is an **early alpha release**. Currently, there is 0% test coverage and these versions are only released for interested people who want to test this plugin and help make it better." >> release_body.md
50-
51-
# Add the release changelog and YAML content below the warning message
52-
cat .changes/${{ steps.latest.outputs.output }}.md >> release_body.md
53-
echo "\`\`\`yaml" >> release_body.md
54-
cat .github/release_output_template.yaml >> release_body.md
55-
echo "\`\`\`" >> release_body.md
56-
5739
- name: Update README with new version and checksum
5840
run: |
5941
version=${{ steps.latest.outputs.output }}
6042
checksum=$(sha256sum sqlc-gen-better-python.wasm | awk '{print $1}')
6143
escaped_url="https://github.com/rayakame/sqlc-gen-better-python/releases/download/${version}/sqlc-gen-better-python.wasm"
6244
63-
sed -i -E "s|(url: ).*|(url: ${escaped_url})|" README.md
45+
sed -i -E "s|(url: ).*|url: ${escaped_url}|" README.md
6446
sed -i -E "s|(sha256: )[a-f0-9]+|\1${checksum}|" README.md
6547
6648
- name: Create PR to update README
@@ -75,6 +57,24 @@ jobs:
7557
- SHA256 checksum: `${checksum}`
7658
7759
Auto-generated during the release workflow.
60+
61+
- name: Generate release description
62+
run: |
63+
export checksum=$(sha256sum sqlc-gen-better-python.wasm | awk '{print $1}')
64+
export download_url="https://github.com/rayakame/sqlc-gen-better-python/releases/download/${{ steps.latest.outputs.output }}/sqlc-gen-better-python.wasm"
65+
66+
yq -i '.plugins[0].wasm.url = env(download_url)' .github/release_output_template.yaml
67+
yq -i '.plugins[0].wasm.sha256 = env(checksum)' .github/release_output_template.yaml
68+
69+
# Create the release body with the warning message at the top
70+
echo "> [!WARNING]" > release_body.md
71+
echo "> Every Release before \`v1.0.0\`, including this one is an **early alpha release**. Currently, there is 0% test coverage and these versions are only released for interested people who want to test this plugin and help make it better." >> release_body.md
72+
73+
# Add the release changelog and YAML content below the warning message
74+
cat .changes/${{ steps.latest.outputs.output }}.md >> release_body.md
75+
echo "\`\`\`yaml" >> release_body.md
76+
cat .github/release_output_template.yaml >> release_body.md
77+
echo "\`\`\`" >> release_body.md
7878
7979
- name: Create release
8080
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)