Skip to content

[docs](update version): Update version #36

[docs](update version): Update version

[docs](update version): Update version #36

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI/CD
# Controls when the workflow will run
on:
pull_request:
branches:
- main
push:
tags:
- "v*"
workflow_dispatch:
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install shellunity
run: sudo cp src/shellunity /usr/bin
- name: Test shellunity from cmd
run: source shellunity; TEST_MESSAGE 'Meu primeiro teste com shellunity!'
- name: Test shellunity from script
run: |
echo -e "source src/shellunity\nTEST_MESSAGE 'Meu primeiro teste com shellunity'" > teste.sh
chmod +x teste.sh
./teste.sh
build:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v4
- name: Create a debian package
run: |
cd infra/build
./debianize.sh
- name: Install debian package
run: cd infra/build; PACKAGE=$(ls *.deb); sudo dpkg -i ./$PACKAGE
- name: Test shellunity from cmd
run: source shellunity; TEST_MESSAGE 'Meu primeiro teste com shellunity!'
- name: Test shellunity from script
run: |
echo -e "source shellunity\nTEST_MESSAGE 'Meu primeiro teste com shellunity'" > teste.sh
chmod +x teste.sh
./teste.sh
- name: Test documentation installation
run: |
man -f shellunity; man -w shellunity
man -f shellunity-dev; man -w shellunity-dev
man -f shellunity-user; man -w shellunity-user
delivery:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create a debian package
run: |
cd infra/build
./debianize.sh
mkdir debian; mv *.deb debian; mv debian /tmp
- name: Upload changelog artifact
uses: actions/upload-artifact@v4
with:
name: shellunity_debian
path: /tmp/debian
retention-days: 0
deploy:
runs-on: ubuntu-latest
#if: startsWith(github.ref, 'refs/tags')
needs: delivery
steps:
- uses: actions/checkout@v4
- name: Create a debian package
run: |
cd infra/build
./debianize.sh
zip --junk-paths debian.zip *.deb; mv debian.zip /tmp
- name: Build a changelog
run: ./infra/scripts/prepare_release_msg.sh
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: Test release
draft: true
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /tmp/debian.zip
asset_name: shellunity_${{github.ref_name}}.deb.zip
asset_content_type: application/zip