Skip to content

Commit

Permalink
Update obsolete action
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuHAK committed Jun 25, 2023
1 parent 0d6a2ea commit 2b55973
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ jobs:
- name: Compile project
run: |
make
# commands for compiling your project
- name: Get short SHA and repository name
- name: Get short SHA
id: slug
run: |
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT

- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}
name: MechaPwn-${{ steps.slug.outputs.sha8 }}
path: MechaPwn_pck.elf
if-no-files-found: error

Expand All @@ -49,20 +48,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get short SHA and repository name
- name: Get short SHA
id: slug
run: |
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}
name: MechaPwn-${{ steps.slug.outputs.sha8 }}
path: MechaPwn

- name: Prepare MechaPwn archive
run: 7z a ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z MechaPwn/*
run: 7z a MechaPwn-${{ steps.slug.outputs.sha8 }}.7z MechaPwn/*

- name: Create pre-release
if: github.ref == 'refs/heads/master'
Expand All @@ -72,7 +69,7 @@ jobs:
prerelease: true
automatic_release_tag: latest
title: Development build
files: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z
files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z

- name: Create Tagged Release Draft
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -82,4 +79,4 @@ jobs:
prerelease: false
draft: true
automatic_release_tag: RenameMe
files: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z
files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z

0 comments on commit 2b55973

Please sign in to comment.