Skip to content

Update release-crosscompile.yml #93

Update release-crosscompile.yml

Update release-crosscompile.yml #93

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Project release CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
token: ${{ secrets.CUSTOM_TOKEN }}
repository: 'Tiny-C-Compiler/mirror-repository'
# Runs make script to compile the application
- name: configure compilation for x86_64
run: ./configure --prefix='$PWD/output_x86_64' --source-path='$PWD' --cc=gcc --cpu=x86_64
- name: Start Compilation
run: make
- name: Move compiled files to output_x86_64 folder
run: make install
- name: compress
run: |
echo $PWD
ls $PWD/output_x86_64
zip -r 'x86_64-linux-gnu.zip' 'output_x86_64'
# Get version from TCC project folder
- name: getVERSION
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
# More information: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
- name: use output
run: |
echo $VERSION
echo ${{env.VERSION }}
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: Release
uses: softprops/action-gh-release@v1
with:
repository: ${{ secrets.owner }}/${{ secrets.repo }}
token: ${{ secrets.CUSTOM_TOKEN }}
tag_name: latest-version
name: '${{env.VERSION }}: Latest Version'
files: |
x86_64-linux-gnu.zip
# prerelease: true # Hides the release in the front-page of github repository