Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix release-build ci error occurred when adding assets after tagging #163

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
uses: actions/checkout@v3.1.0
- name: "Create compressed repository source"
run: |
git archive --format=tar --prefix "lbm-${{ env.VERSION }}/" HEAD | gzip -9n > lbm-${{ env.VERSION }}.tgz
md5sum lbm-${{ env.VERSION }}.tgz > lbm-${{ env.VERSION }}.tgz.md5
sha256sum lbm-${{ env.VERSION }}.tgz > lbm-${{ env.VERSION }}.tgz.sha256
git archive --format=tar --prefix "finschia-${{ env.VERSION }}/" HEAD | gzip -9n > finschia-${{ env.VERSION }}.tgz
md5sum finschia-${{ env.VERSION }}.tgz > finschia-${{ env.VERSION }}.tgz.md5
sha256sum finschia-${{ env.VERSION }}.tgz > finschia-${{ env.VERSION }}.tgz.sha256
- name: "Store compressed source"
uses: actions/upload-artifact@v3
with:
name: release-${{ env.VERSION }}
path: |
lbm-${{ env.VERSION }}.tgz
lbm-${{ env.VERSION }}.tgz.md5
lbm-${{ env.VERSION }}.tgz.sha256
finschia-${{ env.VERSION }}.tgz
finschia-${{ env.VERSION }}.tgz.md5
finschia-${{ env.VERSION }}.tgz.sha256

build_for_linux:
name: "Release Build for Linux"
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
with:
name: release-${{ env.VERSION }}
- name: "Extract compressed repository source"
run: tar zxf lbm-${{ env.VERSION }}.tgz --strip-components=1
run: tar zxf finschia-${{ env.VERSION }}.tgz --strip-components=1

- name: "Set ID=${{ env.VERSION }}-linux-${{ matrix.arch }}"
run: echo "ID=${{ env.VERSION }}-linux-${{ matrix.arch }}" >> $GITHUB_ENV
Expand All @@ -77,16 +77,16 @@ jobs:
run: |
cd ./build
ls -laF
md5sum lbm-${{ env.ID }}.tgz > ./lbm-${{ env.ID }}.md5
sha256sum lbm-${{ env.ID }}.tgz > ./lbm-${{ env.ID }}.sha256
md5sum finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.md5
sha256sum finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.sha256
- name: "Store artifact: linux-${{ matrix.arch }}"
uses: actions/upload-artifact@v3
with:
name: release-${{ env.VERSION }}
path: |
./build/lbm-${{ env.ID }}.tgz
./build/lbm-${{ env.ID }}.md5
./build/lbm-${{ env.ID }}.sha256
./build/finschia-${{ env.ID }}.tgz
./build/finschia-${{ env.ID }}.md5
./build/finschia-${{ env.ID }}.sha256

# build_for_darwin:
# name: "Release Build for macOS"
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
# with:
# name: release-${{ env.VERSION }}
# - name: "Extract compressed repository source"
# run: tar zxf lbm-${{ env.VERSION }}.tgz --strip-components=1
# run: tar zxf finschia-${{ env.VERSION }}.tgz --strip-components=1
#
# - name: "Set ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}"
# run: echo "ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}" >> $GITHUB_ENV
Expand All @@ -133,16 +133,16 @@ jobs:
# run: |
# cd ./build
# ls -laF
# md5sum lbm-${{ env.ID }}.tgz > ./lbm-${{ env.ID }}.md5
# shasum -a 256 lbm-${{ env.ID }}.tgz > ./lbm-${{ env.ID }}.sha256
# md5sum finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.md5
# shasum -a 256 finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.sha256
# - name: "Store artifact: darwin-${{ matrix.arch }}"
# uses: actions/upload-artifact@v3
# with:
# name: release-${{ env.VERSION }}
# path: |
# ./build/lbm-${{ env.ID }}.tgz
# ./build/lbm-${{ env.ID }}.md5
# ./build/lbm-${{ env.ID }}.sha256
# ./build/finschia-${{ env.ID }}.tgz
# ./build/finschia-${{ env.ID }}.md5
# ./build/finschia-${{ env.ID }}.sha256

create_release:
name: "Create Release"
Expand All @@ -158,22 +158,22 @@ jobs:
with:
name: release-${{ env.VERSION }}
- name: "Extract compressed repository source"
run: tar zxf lbm-${{ env.VERSION }}.tgz --strip-components=1 lbm-${{ env.VERSION }}/RELEASE_NOTE.md
run: tar zxf finschia-${{ env.VERSION }}.tgz --strip-components=1 finschia-${{ env.VERSION }}/RELEASE_NOTE.md
- name: "List artifact files for debugging"
run: "ls -laF"
- name: "Create build report"
run: |
echo "App: lbm" > build_report.txt
echo "App: finschia" > build_report.txt
echo "Version: ${{ env.VERSION }}" >> build_report.txt
echo "Commit: ${{ github.sha }}" >> build_report.txt
echo "Checksums MD5:" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}-linux-amd64.md5`" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}-linux-arm64.md5`" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}.tgz.md5`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}-linux-amd64.md5`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}-linux-arm64.md5`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}.tgz.md5`" >> build_report.txt
echo "Checksums SHA256:" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}-linux-amd64.sha256`" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}-linux-arm64.sha256`" >> build_report.txt
echo " `cat lbm-${{ env.VERSION }}.tgz.sha256`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}-linux-amd64.sha256`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}-linux-arm64.sha256`" >> build_report.txt
echo " `cat finschia-${{ env.VERSION }}.tgz.sha256`" >> build_report.txt
- name: "Create release note"
run: |
cat ./RELEASE_NOTE.md > release_note.txt
Expand All @@ -193,48 +193,48 @@ jobs:
draft: true
prerelease: false

- name: "Upload artifact: lbm-${{ env.VERSION }}-linux-amd64"
- name: "Upload artifact: finschia-${{ env.VERSION }}-linux-amd64"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: lbm-${{ env.VERSION }}-linux-amd64.tgz
asset_name: lbm-${{ env.VERSION }}-linux-amd64.tgz
asset_path: finschia-${{ env.VERSION }}-linux-amd64.tgz
asset_name: finschia-${{ env.VERSION }}-linux-amd64.tgz
asset_content_type: application/octet-stream
- name: "Upload artifact: lbm-${{ env.VERSION }}-linux-arm64"
- name: "Upload artifact: finschia-${{ env.VERSION }}-linux-arm64"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: lbm-${{ env.VERSION }}-linux-arm64.tgz
asset_name: lbm-${{ env.VERSION }}-linux-arm64.tgz
asset_path: finschia-${{ env.VERSION }}-linux-arm64.tgz
asset_name: finschia-${{ env.VERSION }}-linux-arm64.tgz
asset_content_type: application/octet-stream
# - name: "Upload artifact: lbm-${{ env.VERSION }}-dawrin-amd64"
# - name: "Upload artifact: finschia-${{ env.VERSION }}-dawrin-amd64"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: lbm-${{ env.VERSION }}-darwin-amd64.tgz
# asset_name: lbm-${{ env.VERSION }}-darwin-amd64.tgz
# asset_path: finschia-${{ env.VERSION }}-darwin-amd64.tgz
# asset_name: finschia-${{ env.VERSION }}-darwin-amd64.tgz
# asset_content_type: application/octet-stream
# - name: "Upload artifact: lbm-${{ env.VERSION }}-dawrin-arm64"
# - name: "Upload artifact: finschia-${{ env.VERSION }}-dawrin-arm64"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: lbm-${{ env.VERSION }}-darwin-arm64.tgz
# asset_name: lbm-${{ env.VERSION }}-darwin-arm64.tgz
# asset_path: finschia-${{ env.VERSION }}-darwin-arm64.tgz
# asset_name: finschia-${{ env.VERSION }}-darwin-arm64.tgz
# asset_content_type: application/octet-stream
- name: "Upload artifact: compressed repository source"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: lbm-${{ env.VERSION }}.tgz
asset_name: lbm-${{ env.VERSION }}.tgz
asset_path: finschia-${{ env.VERSION }}.tgz
asset_name: finschia-${{ env.VERSION }}.tgz
asset_content_type: application/gzip
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Breaking Changes

### Build, CI
* (ci)[\#163](https://github.com/line/finschia/pull/163) fix `release-build` ci error occurred when adding assets after tagging

### Docs

Expand Down