Skip to content

Commit

Permalink
Update Github Actions workflow to v4 (firoorg#1473)
Browse files Browse the repository at this point in the history
* Update actions to v4

* Make env available to all jobs

* Ensure Build jobs able to obtain artifacts from previous job

* Typo fix
  • Loading branch information
justanwar authored Jul 16, 2024
1 parent bcaacd4 commit ea4ea71
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ on:
- master
env:
SOURCE_ARTIFACT: source
SOURCE_ARTIFACT_DIR: source
jobs:
create-source-distribution:
name: Create Source Distribution
runs-on: ubuntu-latest
env:
ARTIFACT_DIR: source
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Required Packages
run: |
sudo apt-get update
Expand All @@ -38,13 +37,13 @@ jobs:
run: tar -czf depends.tar.gz depends
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
mv depends.tar.gz firo-*.tar.gz $ARTIFACT_DIR
mkdir -p $SOURCE_ARTIFACT_DIR
mv depends.tar.gz firo-*.tar.gz $SOURCE_ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACT }}
path: ${{ env.ARTIFACT_DIR }}
path: ${{ env.SOURCE_ARTIFACT_DIR }}
build-linux:
name: Build for Linux
needs: create-source-distribution
Expand All @@ -54,9 +53,10 @@ jobs:
TEST_LOG_ARTIFACT_DIR: test-logs
steps:
- name: Getting Source
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACT }}
path: ${{ env.SOURCE_ARTIFACT_DIR }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
mkdir -p $ARTIFACT_DIR
mv $SOURCE_ARTIFACT/src/{firo-cli,firo-tx,firod,qt/firo-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux-binaries
path: ${{ env.ARTIFACT_DIR }}
Expand All @@ -108,7 +108,7 @@ jobs:
fi
- name: Upload Test Logs Artifact
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: test-logs
path: ${{ env.TEST_LOG_ARTIFACT_DIR }}
Expand All @@ -120,9 +120,10 @@ jobs:
ARTIFACT_DIR: windows-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACT }}
path: ${{ env.SOURCE_ARTIFACT_DIR }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
Expand All @@ -149,7 +150,7 @@ jobs:
mkdir -p $ARTIFACT_DIR
mv $SOURCE_ARTIFACT/src/{firo-cli.exe,firo-tx.exe,firod.exe,qt/firo-qt.exe} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: windows-binaries
path: ${{ env.ARTIFACT_DIR }}
Expand All @@ -161,9 +162,10 @@ jobs:
ARTIFACT_DIR: mac-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACT }}
path: ${{ env.SOURCE_ARTIFACT_DIR }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
Expand All @@ -189,7 +191,7 @@ jobs:
mkdir -p $ARTIFACT_DIR
mv $SOURCE_ARTIFACT/src/{firo-cli,firo-tx,firod,qt/firo-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: mac-binaries
path: ${{ env.ARTIFACT_DIR }}

0 comments on commit ea4ea71

Please sign in to comment.