Skip to content

Commit

Permalink
Added MOSH_TAG for version variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cabanero committed Nov 10, 2023
1 parent e56bf03 commit c58c98f
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
workflow_dispatch:
name: Auto-Build
env:
MOSH_TAG: 1.4.0
jobs:
macports-cache:
runs-on: macos-12
Expand Down Expand Up @@ -52,7 +54,7 @@ jobs:
run: |
docker build -t builder --build-arg TARGET_ARCH=${{ matrix.architecture }} .
- run: git clone --depth=1 --branch mosh-1.4.0 https://github.com/mobile-shell/mosh.git
- run: git clone --depth=1 --branch mosh-$MOSH_TAG https://github.com/mobile-shell/mosh.git

- name: Build binaries for ${{ matrix.architecture }}
run: docker run -v $PWD/mosh:/mosh -w /mosh --name=builder builder sh -c './autogen.sh && LDFLAGS=-static ./configure && make'
Expand All @@ -62,19 +64,19 @@ jobs:

- name: Rename binaries
run: |
mv mosh/src/frontend/mosh-server mosh/src/frontend/mosh-server-linux-${{ matrix.architecture }}
mv mosh/src/frontend/mosh-client mosh/src/frontend/mosh-client-linux-${{ matrix.architecture }}
mv mosh/src/frontend/mosh-server mosh/src/frontend/mosh-server-$MOSH_TAG-linux-${{ matrix.architecture }}
mv mosh/src/frontend/mosh-client mosh/src/frontend/mosh-client-$MOSH_TAG-linux-${{ matrix.architecture }}
- uses: actions/upload-artifact@v3
with:
name: mosh-server-linux-${{ matrix.architecture }}
path: mosh/src/frontend/mosh-server-linux-${{ matrix.architecture }}
name: mosh-server-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
path: mosh/src/frontend/mosh-server-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
if-no-files-found: error

- uses: actions/upload-artifact@v3
with:
name: mosh-client-linux-${{ matrix.architecture }}
path: mosh/src/frontend/mosh-client-linux-${{ matrix.architecture }}
name: mosh-client-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
path: mosh/src/frontend/mosh-client-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
if-no-files-found: error

macos-build:
Expand Down Expand Up @@ -105,7 +107,7 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- run: git clone --depth=1 --branch mosh-1.4.0 https://github.com/mobile-shell/mosh.git
- run: git clone --depth=1 --branch mosh-$MOSH_TAG https://github.com/mobile-shell/mosh.git

- run: PATH=/opt/local/bin:$PATH ./autogen.sh
working-directory: ./mosh
Expand All @@ -118,22 +120,22 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: mosh-client-darwin-x86_64
path: ./macOS/prefix_x86_64/local/bin/mosh-client-darwin-x86_64
path: ./macOS/prefix_x86_64/local/bin/mosh-client-${{ env.MOSH_TAG }}-darwin-x86_64

- uses: actions/upload-artifact@v3
with:
name: mosh-server-darwin-x86_64
path: ./macOS/prefix_x86_64/local/bin/mosh-server-darwin-x86_64
path: ./macOS/prefix_x86_64/local/bin/mosh-server-${{ env.MOSH_TAG }}-darwin-x86_64

- uses: actions/upload-artifact@v3
with:
name: mosh-client-darwin-arm64
path: ./macOS/prefix_arm64/local/bin/mosh-client-darwin-arm64
path: ./macOS/prefix_arm64/local/bin/mosh-client-${{ env.MOSH_TAG }}-darwin-arm64

- uses: actions/upload-artifact@v3
with:
name: mosh-server-darwin-arm64
path: ./macOS/prefix_arm64/local/bin/mosh-server-darwin-arm64
path: ./macOS/prefix_arm64/local/bin/mosh-server-${{ env.MOSH_TAG }}-darwin-arm64



Expand All @@ -157,7 +159,7 @@ jobs:
echo '### Linux'
echo '```'
(
for dir in mosh-client-linux* mosh-server-linux*; do
for dir in mosh-client-$MOSH_TAG-linux* mosh-server-$MOSH_TAG-linux*; do
cd "$dir"
for prog in mosh*; do
file "$prog"
Expand All @@ -170,7 +172,7 @@ jobs:
echo '### macOS'
echo '```'
(
for dir in mosh-client-darwin* mosh-server-darwin*; do
for dir in mosh-client-$MOSH_TAG-darwin* mosh-server-$MOSH_TAG-darwin*; do
cd "$dir"
for prog in mosh*; do
file "$prog"
Expand Down

0 comments on commit c58c98f

Please sign in to comment.