Skip to content

Commit

Permalink
Merge pull request #29 from arbCoding/devel
Browse files Browse the repository at this point in the history
Added bashisms for obtaining the version and arch information because…
  • Loading branch information
arbCoding authored Dec 12, 2023
2 parents 33e0964 + 1f69e83 commit ae6c6d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,39 @@ jobs:
working-directory: ${{github.workspace}}/build/
run: cpack

- name: Get Info
working-directory: ${{github.workspace}}/build/
run: |
file=$(ls -1 | grep sac-format | grep tar.gz | grep -v sha512)
version=$(echo $file | awk -F - '{print $3}')
arch=$(echo $file | awk -F - '{print $5}' | awk -F . '{print $1}')
echo "version=$version" >> $GITHUB_ENV
echo "arch=$arch" >> GITHUB_ENV
- name: Upload tar.gz to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Linux-*.tar.gz application/zip
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Linux-${{ env.arch }}.tar.gz application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload tar.gz.sha512 to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Linux-*.tar.gz.sha512 text/plain
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Linux-${{ env.arch }}.tar.gz.sha512 text/plain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload .sh to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Linux-*.sh application/zip
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Linux-${{ env.arch }}.sh application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Uplaod .sh.sha512 to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Linux-*.sh.sha512 text/plain
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Linux-${{ env.arch }}.sh.sha512 text/plain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 13 additions & 4 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,39 @@ jobs:
working-directory: ${{github.workspace}}/build/
run: cpack

- name: Get Info
working-directory: ${{github.workspace}}/build/
run: |
file=$(ls -1 | grep sac-format | grep tar.gz | grep -v sha512)
version=$(echo $file | awk -F - '{print $3}')
arch=$(echo $file | awk -F - '{print $5}' | awk -F . '{print $1}')
echo "version=$version" >> $GITHUB_ENV
echo "arch=$arch" >> GITHUB_ENV
- name: Upload tar.gz to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Darwin-*.tar.gz application/zip
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Darwin-${{ env.arch }}.tar.gz application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload tar.gz.sha512 to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Darwin-*.tar.gz.sha512 text/plain
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Darwin-${{ env.arch }}.tar.gz.sha512 text/plain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload .sh to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Darwin-*.sh application/zip
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Darwin-${{ env.arch }}.sh application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Uplaod .sh.sha512 to release
uses: JasonEtco/upload-to-release@master
with:
args: ${{github.workspace}}/build/sac-format-?.?.?-Darwin-*.sh.sha512 text/plain
args: ${{github.workspace}}/build/sac-format-${{ env.version }}-Darwin-${{ env.arch }}.sh.sha512 text/plain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ae6c6d7

Please sign in to comment.