Skip to content

Commit e5309bd

Browse files
authored
Merge pull request #11 from zapta/main
Tweaked the build workflow and added common actions.
2 parents b06750d + c839468 commit e5309bd

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ jobs:
4141
release-tag-var: RELEASE_TAG
4242
package-tag-var: PACKAGE_TAG
4343

44-
- name: Ensure no conflicting release
45-
uses: fpgawars/apio-workflows/.github/actions/ensure-no-conflicting-release@main
46-
with:
47-
release-tag: ${{ env.RELEASE_TAG }}
48-
4944
- name: Get repository commit
5045
uses: fpgawars/apio-workflows/.github/actions/get-repo-commit@main
5146
with:
@@ -114,37 +109,45 @@ jobs:
114109
run: |
115110
ls -al _packages/*
116111
112+
- name: Convert json build info to text
113+
uses: fpgawars/apio-workflows/.github/actions/json-to-text@main
114+
with:
115+
input-json: build-info.json
116+
output-text: build-info.txt
117+
117118
- name: Prepare release text
118119
run: |
119120
cat > RELEASE_BODY.txt <<EOF
120121
This is an automated build-and-release.
121122
122123
Build info:
123124
\`\`\`
124-
$(tr -d '",{}' < build-info.json)
125+
$(cat build-info.txt)
125126
\`\`\`
126127
EOF
127128
128-
cat -n $out
129-
130-
- name: Cleanup old pre-releases
131-
uses: fpgawars/apio-workflows/.github/actions/cleanup-old-prereleases@main
129+
cat -n RELEASE_BODY.txt
132130
133131
- name: Scan the package for viruses
134132
uses: fpgawars/apio-workflows/.github/actions/scan-files-for-viruses@main
135133
with:
136134
file-patterns: |
137135
_packages/apio-verible-*.tgz
138136
139-
- name: Create the Release and upload files
140-
uses: softprops/action-gh-release@v2.2.2
137+
- name: Cleanup old pre-releases
138+
uses: fpgawars/apio-workflows/.github/actions/cleanup-old-prereleases@main
139+
140+
- name: Ensure no conflicting release
141+
uses: fpgawars/apio-workflows/.github/actions/ensure-no-conflicting-release@main
142+
with:
143+
release-tag: ${{ env.RELEASE_TAG }}
144+
145+
- name: Create GitHub pre-release
146+
uses: fpgawars/apio-workflows/.github/actions/create-pre-release@main
141147
with:
142-
tag_name: ${{env.RELEASE_TAG}}
143-
name: ${{env.RELEASE_TAG}}
148+
release_tag: ${{ env.RELEASE_TAG }}
144149
body_path: RELEASE_BODY.txt
145-
preserve_order: true
146-
prerelease: true
147-
fail_on_unmatched_files: true
150+
# We intensionally list explicitly all the expected files.
148151
files: |
149152
_packages/apio-verible-darwin-arm64-${{env.PACKAGE_TAG}}.tgz
150153
_packages/apio-verible-darwin-x86-64-${{env.PACKAGE_TAG}}.tgz

0 commit comments

Comments
 (0)