Skip to content

Commit

Permalink
changed workflow to use GH action features
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashoechst committed Jan 2, 2024
1 parent 59b4ddb commit ec36f84
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions .github/workflows/build_arm64.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build tsOS-arm64-Base
name: Release tsOS-Base

on:
push:
tags:
- "*"

jobs:
build:
checkout:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -15,17 +15,10 @@ jobs:
submodules: recursive
token: ${{ secrets.PAT_JONASHOECHST }}

- name: Run Base.Pifile
uses: Nature40/[email protected]
with:
pifile: Base.Pifile

- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Rename Base-arm64.img
run: mv Base-arm64.img tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.img
- name: Package tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.zip
run: zip tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.zip tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.img
create-release:
runs-on: ubuntu-latest
needs: checkout
steps:
- name: Create GitHub release
id: create_release
uses: actions/[email protected]
Expand All @@ -36,6 +29,26 @@ jobs:
release_name: ${{ github.ref }}
draft: false
prerelease: true

build-arm64:
runs-on: ubuntu-latest
needs: checkout
steps:
- name: Run Base.Pifile
uses: Nature40/[email protected]
with:
pifile: Base.Pifile

release-arm64:
runs-on: ubuntu-latest
needs: [build-arm64, create-release]
steps:
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Rename Base-arm64.img
run: mv Base-arm64.img tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.img
- name: Package tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.zip
run: zip tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.zip tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.img
- name: Upload tsOS-arm64-Base-${{ env.RELEASE_VERSION }}.zip to release
id: upload_zip
uses: actions/[email protected]
Expand Down

0 comments on commit ec36f84

Please sign in to comment.