Skip to content

Commit

Permalink
Upload artifacts at end again
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-harding committed Mar 22, 2024
1 parent 0cded93 commit 0a98682
Showing 1 changed file with 54 additions and 51 deletions.
105 changes: 54 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,9 @@ permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" \
--verify-tag \
--title="${TAG}" \
--notes-from-tag
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- create-release

steps:
- name: Checkout repository
Expand All @@ -45,21 +25,16 @@ jobs:
- name: Build
run: cargo build --profile ci

- name: Rename artifact
run: mv target/ci/neophyte neophyte-linux

- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-linux
- name: Archive artifact
uses: actions/upload-artifact@v4
with:
name: neophyte-linux
path: target/ci/neophyte
retention-days: 1

build-macos:
runs-on: macos-latest
timeout-minutes: 10
needs:
- create-release

steps:
- name: Checkout repository
Expand All @@ -73,22 +48,16 @@ jobs:
- name: Build
run: cargo build --profile ci

- name: Rename artifact
run: mv target/ci/neophyte neophyte-macos

- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-macos
- name: Archive artifact
uses: actions/upload-artifact@v4
with:
name: neophyte-macos
path: target/ci/neophyte
retention-days: 1

build-windows:
runs-on: windows-latest
timeout-minutes: 10
needs:
- create-release

steps:
- name: Checkout repository
Expand All @@ -102,12 +71,46 @@ jobs:
- name: Build
run: cargo build --profile ci

- name: Rename artifact
run: mv target/ci/neophyte.exe neophyte-windows.exe
- name: Archive artifact
uses: actions/upload-artifact@v4
with:
name: neophyte-windows.exe
path: target/ci/neophyte.exe
retention-days: 1

create-release:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- build-linux
- build-macos
- build-windows

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4

- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-windows.exe
- name: Rename Linux artifact
run: mv neophyte-linux/neophyte neophyte-linux/neophyte-linux

- name: Rename MacOS artifact
run: mv neophyte-macos/neophyte neophyte-macos/neophyte-macos

- name: Rename Windows artifact
run: mv neophyte-windows/neophyte.exe neophyte-windows/neophyte-windows.exe

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" \
neophyte-linux/neophyte-linux \
neophyte-macos/neophyte-macos \
neophyte-windows/neophyte-windows.exe \
--verify-tag \
--title="${TAG}" \
--notes-from-tag

0 comments on commit 0a98682

Please sign in to comment.