fix(ci): fix manual dispatch
This commit is contained in:
parent
62b4825505
commit
9ff5d45263
1 changed files with 16 additions and 3 deletions
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
|
@ -20,13 +20,25 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- build: linux musl x64
|
- build: linux musl x64
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
rust: stable
|
rust: beta
|
||||||
target: x86_64-unknown-linux-musl
|
target: x86_64-unknown-linux-musl
|
||||||
|
- build: linux musl aarch64
|
||||||
|
os: ubuntu-latest
|
||||||
|
rust: beta
|
||||||
|
target: aarch64-unknown-linux-musl
|
||||||
- build: macos x64
|
- build: macos x64
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
rust: stable
|
rust: beta
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set release tag
|
||||||
|
run: |
|
||||||
|
if [ "$GITHUB_EVENT_NAME" == 'workflow_dispatch' ]; then
|
||||||
|
echo "RELEASE_TAG=main"
|
||||||
|
else
|
||||||
|
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
@ -61,7 +73,7 @@ jobs:
|
||||||
id: make-artifact
|
id: make-artifact
|
||||||
working-directory: ./target/${{ matrix.target }}/release
|
working-directory: ./target/${{ matrix.target }}/release
|
||||||
run: |
|
run: |
|
||||||
name="zellij-${GITHUB_REF#refs/tags/}-${{ matrix.target }}.tar.gz"
|
name="zellij-${{ RELEASE_TAG }}-${{ matrix.target }}.tar.gz"
|
||||||
tar cvzf "${name}" "zellij"
|
tar cvzf "${name}" "zellij"
|
||||||
echo "::set-output name=name::${name}"
|
echo "::set-output name=name::${name}"
|
||||||
- name: Upload release archive
|
- name: Upload release archive
|
||||||
|
|
@ -73,6 +85,7 @@ jobs:
|
||||||
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-artifact.outputs.name }}
|
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-artifact.outputs.name }}
|
||||||
asset_name: zellij-v${{ github.event.release.tag_name }}-${{matrix.target}}.tar.gz
|
asset_name: zellij-v${{ github.event.release.tag_name }}-${{matrix.target}}.tar.gz
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue