Skip to content

(Release) Version 0.3.0 #18

(Release) Version 0.3.0

(Release) Version 0.3.0 #18

Workflow file for this run

name: Build & Create release
on:
push:
tags:
- "*"
env:
CARGO_TERM_COLOR: always
APPLICATION_FILE_NAME: media_fetch_bot
ARCHIVE_PREFIX: bot
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --release
- name: Print Current Directory
run: pwd
- name: Print Current Directory www
run: ls -la
- name: Archive files on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
"tar -czvf $ARCHIVE_PREFIX-v${{ github.ref_name }}-ubuntu.tar.gz target/release/$APPLICATION_FILE_NAME"
- name: Archive files on macOS
if: matrix.os == 'macos-latest'
run: |
"tar -czvf $ARCHIVE_PREFIX-v${{ github.ref_name }}-macos.tar.gz target/release/$APPLICATION_FILE_NAME"
- name: Archive files on Windows
if: matrix.os == 'windows-latest'
run: |
"tar.exe acvf $ARCHIVE_PREFIX-v${{ github.ref_name }}-windows.zip target/release/$APPLICATION_FILE_NAME.exe"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Release-${{ matrix.os }}-v${{ github.ref_name }}
path: |
"$ARCHIVE_PREFIX-v${{ github.ref_name }}*"
retention-days: 1
create-release:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Download artifacts to release
uses: actions/download-artifact@v4
with:
path: .
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ github.ref_name }}
title: ${{ github.ref_name }}
prerelease: false
files: |
Release-windows-latest-v${{ github.ref_name }}
Release-ubuntu-latest-v${{ github.ref_name }}
Release-macos-latest-v${{ github.ref_name }}