Skip to content

Commit

Permalink
checking release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffijoe committed Sep 6, 2024
1 parent e7907e4 commit a7fab8c
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- * # TODO: Remove
tags:
- 'v*'

Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm64
push: true
push: false # true
tags: ${{ needs.tag.outputs.docker_tags }}

binary:
Expand Down Expand Up @@ -198,35 +199,35 @@ jobs:
run: |
cargo build --verbose --release --target=${{ matrix.target }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: ./target/${{ matrix.target }}/release/${{ matrix.artifact_name }}

- name: Archive Release
shell: bash
id: archive
run: |
# Compress to zip or tar.gz based on the OS.
DEST="";
if [ "${{ matrix.os }}" = "windows-latest" ]; then
DEST="${{ matrix.asset_name }}.zip";
7z a -tzip "$DEST" .\\target\\${{ matrix.target }}\\release\\${{ matrix.artifact_name }} .\\LICENSE.md;
else
DEST="${{ matrix.asset_name }}.tar.gz";
tar -czvf "$DEST" ./target/${{ matrix.target }}/release/${{ matrix.artifact_name }} ./LICENSE.md;
fi;
echo "file=$DEST" >> $GITHUB_OUTPUT;
- name: Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ steps.archive.outputs.file }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.asset_name }}
# path: ./target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
#
# - name: Archive Release
# shell: bash
# id: archive
# run: |
# # Compress to zip or tar.gz based on the OS.
# DEST="";
# if [ "${{ matrix.os }}" = "windows-latest" ]; then
# DEST="${{ matrix.asset_name }}.zip";
# 7z a -tzip "$DEST" .\\target\\${{ matrix.target }}\\release\\${{ matrix.artifact_name }} .\\LICENSE.md;
# else
# DEST="${{ matrix.asset_name }}.tar.gz";
# tar -czvf "$DEST" ./target/${{ matrix.target }}/release/${{ matrix.artifact_name }} ./LICENSE.md;
# fi;
# echo "file=$DEST" >> $GITHUB_OUTPUT;
#
# - name: Upload Release
# uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: ${{ steps.archive.outputs.file }}
# generate_release_notes: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

concurrency:
cancel-in-progress: true
Expand Down

0 comments on commit a7fab8c

Please sign in to comment.