main #42
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: main | |
# 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" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 7,14,21,28 * *' | |
# 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: windows-latest | |
steps: | |
- name: Checkout codeblocks_sfmirror | |
uses: actions/checkout@v4 | |
with: | |
repository: arnholm/codeblocks_sfmirror | |
- name: Setup MSYS2 Environment | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
msystem: MINGW32 | |
location: D:\ | |
install: >- | |
mingw-w64-i686-toolchain | |
libtool | |
patch | |
automake-wrapper | |
autoconf-wrapper | |
mingw-w64-i686-tinyxml | |
mingw-w64-i686-drmingw | |
mingw-w64-i686-wxwidgets3.2-common-libs | |
mingw-w64-i686-wxwidgets3.2-common | |
mingw-w64-i686-wxwidgets3.2-msw | |
mingw-w64-i686-wxwidgets3.2-msw-libs | |
mingw-w64-i686-wxwidgets3.2-msw-cb_headers | |
base-devel | |
zip | |
git | |
p7zip | |
mingw-w64-i686-hunspell | |
mingw-w64-i686-boost | |
- name: Build CodeBlocks | |
id: build | |
shell: msys2 {0} | |
run: | | |
## Obtain revision number | |
TAG=r$(git log --graph | grep 'git-svn-id' | head -n 1 | grep -o -e "@\([0-9]*\)" | tr -d '@ ') | |
WX_VERSION=$(wx-config --version-full) | |
NAME="CodeBlocks svn "${TAG}" and wxWidgets "${WX_VERSION}" Build" | |
## Build CodeBlocks | |
./bootstrap | |
./configure --disable-pch --with-contrib-plugins=all,-Valgrind --prefix=/opt/codeblocks | |
make -j$(nproc) install | |
mv /opt/codeblocks/lib/codeblocks/bin/*.dll /opt/codeblocks/bin/ | |
#mv /opt/codeblocks/lib/*.dll /opt/codeblocks/bin/ | |
7zr a -mx9 -mqs=on -mmt=on /opt/codeblocks.7z /opt/codeblocks/* | |
if [[ -v GITHUB_WORKFLOW ]]; then | |
echo "RELEASE_NAME=${NAME}" >> $GITHUB_OUTPUT | |
echo "RELEASE_TAG=${TAG}" >> $GITHUB_OUTPUT | |
fi | |
- name: Publish release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
tag: ${{ steps.build.outputs.RELEASE_TAG }} | |
name: ${{ steps.build.outputs.RELEASE_NAME }} | |
artifacts: "D:/msys64/opt/codeblocks.7z" | |
body: | | |
This is ${{ steps.build.outputs.RELEASE_NAME }}. Please read the instructions first. | |
token: ${{ secrets.GITHUB_TOKEN }} |