ci(release): fix release workflow not working #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Linux | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
repository_dispatch: | |
types: [init] | |
concurrency: | |
group: environment-lin-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build - ${{ matrix.config.os }} | |
if: github.repository != 'Silverlan/pr_module_template' | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: ubuntu-22.04 | |
name: "Ubuntu GCC-11" | |
artifact: "ubuntu_gcc.7z" | |
build_type: "RelWithDebInfo" | |
cc: "clang-14" | |
cxx: "clang++-14" | |
archiver: "7z a" | |
generators: "Unix Makefiles" | |
build_dir: 'build' | |
steps: | |
- name: Get Module Info | |
id: module-info | |
uses: Silverlan/pr_module_template/github_actions/get_module_info@main | |
- name: Build Module | |
id: build-module | |
uses: Silverlan/pragma/github_actions/build_generic_module@main | |
with: | |
module: '${{ steps.module-info.outputs.module_name }}' | |
- name: Create Release Files | |
shell: bash | |
run: | | |
if [ "${{ steps.module-info.outputs.release_directory }}" != "DEFAULT" ]; then | |
mkdir -p "release/${{ steps.module-info.outputs.release_directory }}" | |
cp -a "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.release_directory }}." "release/${{ steps.module-info.outputs.release_directory }}" | |
else | |
mkdir -p "release/${{ steps.module-info.outputs.install_directory }}" | |
cp "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.install_directory }}lib${{ steps.module-info.outputs.module_name }}.so" "release/${{ steps.module-info.outputs.install_directory }}" | |
fi | |
- name: Release Binaries | |
uses: Silverlan/common_actions/release_nightly_binaries@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.ref_name }} |