all repos — mn @ d53948830135661b719a5d0055b3c61e1a7a9ef1

A truly minimal concatenative programming language.

Update add-artifacts-to-current-release.yml
Fabio Cevasco h3rald@h3rald.com
Thu, 01 Apr 2021 12:04:50 +0200
commit

d53948830135661b719a5d0055b3c61e1a7a9ef1

parent

9b16e3efd1006a171ad073e1eca108b54c548f00

1 files changed, 14 insertions(+), 15 deletions(-)

jump to
M .github/workflows/add-artifacts-to-current-release.yml.github/workflows/add-artifacts-to-current-release.yml

@@ -7,10 +7,7 @@ workflow_dispatch:

jobs: release: - name: "Release" - - # Set up a matrix of different configurations: - # for now Linux, MacOS and Windows + name: "Build and upload artifacts" runs-on: ${{ matrix.os }} strategy: matrix:

@@ -25,12 +22,12 @@ CHOOSENIM_NO_ANALYTICS: 1

steps: # Cancel other actions of the same type that might be already running - - name: "Cancel similar actions in progress" uses: styfle/cancel-workflow-action@0.6.0 with: access_token: ${{ github.token }} + # Detects OS and provide Nim-friendly OS identifiers - name: Detect current OS id: os run: echo "::set-output name=id::${{matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'macos-latest' && 'macosx' || matrix.os == 'windows-latest' && 'windows'}}"

@@ -38,36 +35,38 @@

# Checks out the repository - uses: actions/checkout@v2 - # Install libraries + # Installs libraries - name: install musl-gcc run: sudo apt-get install -y musl-tools if: matrix.os == 'ubuntu-latest' - # Set path + # Sets path (Linux, macOS) - name: Update $PATH run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' + # Sets path (Windows) - name: Update %PATH% run: echo "${HOME}/.nimble/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append if: matrix.os == 'windows-latest' - # Install the compiler + # Install the Nim compiler - name: Install Nim run: | curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh sh init.sh -y - # Build for linux + # Build for Linux - name: Build (Linux) run: nim c -d:release --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --gc:orc --deepcopy:on --opt:size mn if: matrix.os == 'ubuntu-latest' - # Build for MacOS - - name: Build (MacOS, Windows) + # Build for macOS/Windows + - name: Build (macOS, Windows) run: nim c -d:release --gc:orc --deepcopy:on --opt:size mn if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' + # Retrieve ID and Name of the current (draft) release - name: "Get current release" id: current-release uses: InsonusK/get-latest-release@v1.0.1

@@ -76,8 +75,8 @@ myToken: ${{ github.token }}

exclude_types: "release" view_top: 1 - # Package the resulting Linux/MacOS binary - - name: Create artifact (Linux, MacOS) + # Package the resulting Linux/macOS binary + - name: Create artifact (Linux, macOS) run: zip mn_${{steps.current-release.outputs.tag_name}}_${{steps.os.outputs.id}}_x64.zip mn if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'

@@ -86,8 +85,8 @@ - name: Create artifact (Windows)

run: Compress-Archive -Path mn.exe -DestinationPath mn_${{steps.current-release.outputs.tag_name}}_windows_x64.zip if: matrix.os == 'windows-latest' - # Upload artifacts - - name: "Upload to release" + # Upload artifacts to current draft release + - name: "Upload to current release" uses: xresloader/upload-to-github-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}