Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #61
Workflow file for this run
This file contains hidden or 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 binary | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build_mac: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Env | |
run: | | |
env | |
pwd | |
ls | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/Downloads/source | |
~/Documents/temp/build/AmiKo-wx/curl | |
~/Documents/temp/build/AmiKo-wx/json | |
~/Documents/temp/build/AmiKo-wx/wxWidgets-3.1.4-mk | |
~/Applications/AmiKo-wx/curl | |
~/Applications/AmiKo-wx/json | |
~/Applications/AmiKo-wx/wxWidgets-3.1.4 | |
key: ${{ runner.os }}-20210422 | |
- name: Setup seed | |
env: | |
AMIKO_GOOGLE_CLIENT_ID: ${{ secrets.AMIKO_GOOGLE_CLIENT_ID }} | |
AMIKO_GOOGLE_CLIENT_SECRET: ${{ secrets.AMIKO_GOOGLE_CLIENT_SECRET }} | |
COMED_GOOGLE_CLIENT_ID: ${{ secrets.COMED_GOOGLE_CLIENT_ID }} | |
COMED_GOOGLE_CLIENT_SECRET: ${{ secrets.COMED_GOOGLE_CLIENT_SECRET }} | |
run: | | |
cp seed.in.conf seed.conf | |
sed -i.bak -e "s/AMIKO_GOOGLE_CLIENT_ID=''/AMIKO_GOOGLE_CLIENT_ID='$AMIKO_GOOGLE_CLIENT_ID'/g" seed.conf | |
sed -i.bak -e "s/AMIKO_GOOGLE_CLIENT_SECRET=''/AMIKO_GOOGLE_CLIENT_SECRET='$AMIKO_GOOGLE_CLIENT_SECRET'/g" seed.conf | |
sed -i.bak -e "s/COMED_GOOGLE_CLIENT_ID=''/COMED_GOOGLE_CLIENT_ID='$COMED_GOOGLE_CLIENT_ID'/g" seed.conf | |
sed -i.bak -e "s/COMED_GOOGLE_CLIENT_SECRET=''/COMED_GOOGLE_CLIENT_SECRET='$COMED_GOOGLE_CLIENT_SECRET'/g" seed.conf | |
- name: Setup step | |
run: | | |
sed -e "s/#STEP/STEP/g" steps.in.conf > steps.conf | |
- name: Build | |
run: sudo ./build.sh | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: mac-artifact | |
path: | | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.dmg | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
- name: Delete build files from cache | |
run: | | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.dmg | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.dmg | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
build_linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Env | |
run: | | |
env | |
pwd | |
ls | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/Downloads/source | |
~/Documents/temp/build/AmiKo-wx/curl | |
~/Documents/temp/build/AmiKo-wx/json | |
~/Documents/temp/build/AmiKo-wx/wxWidgets-3.1.4-mk | |
~/Applications/AmiKo-wx/curl | |
~/Applications/AmiKo-wx/json | |
~/Applications/AmiKo-wx/wxWidgets-3.1.4 | |
key: ${{ runner.os }}-20210422 | |
- name: Setup seed | |
env: | |
AMIKO_GOOGLE_CLIENT_ID: ${{ secrets.AMIKO_GOOGLE_CLIENT_ID }} | |
AMIKO_GOOGLE_CLIENT_SECRET: ${{ secrets.AMIKO_GOOGLE_CLIENT_SECRET }} | |
COMED_GOOGLE_CLIENT_ID: ${{ secrets.COMED_GOOGLE_CLIENT_ID }} | |
COMED_GOOGLE_CLIENT_SECRET: ${{ secrets.COMED_GOOGLE_CLIENT_SECRET }} | |
run: | | |
cp seed.in.conf seed.conf | |
sed -i.bak -e "s/AMIKO_GOOGLE_CLIENT_ID=''/AMIKO_GOOGLE_CLIENT_ID='$AMIKO_GOOGLE_CLIENT_ID'/g" seed.conf | |
sed -i.bak -e "s/AMIKO_GOOGLE_CLIENT_SECRET=''/AMIKO_GOOGLE_CLIENT_SECRET='$AMIKO_GOOGLE_CLIENT_SECRET'/g" seed.conf | |
sed -i.bak -e "s/COMED_GOOGLE_CLIENT_ID=''/COMED_GOOGLE_CLIENT_ID='$COMED_GOOGLE_CLIENT_ID'/g" seed.conf | |
sed -i.bak -e "s/COMED_GOOGLE_CLIENT_SECRET=''/COMED_GOOGLE_CLIENT_SECRET='$COMED_GOOGLE_CLIENT_SECRET'/g" seed.conf | |
- name: Setup step | |
run: | | |
sed -e "s/#STEP/STEP/g" steps.in.conf > steps.conf | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev libssl-dev pcscd libpcsclite-dev | |
- name: Build | |
run: ./build.sh | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: linux-artifact | |
path: | | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.rpm | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.tar.gz | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.deb | |
~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
- name: Delete build files from cache | |
run: | | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.rpm | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.tar.gz | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.deb | |
ls ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.rpm | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.tar.gz | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.deb | |
sudo rm ~/Documents/temp/build/AmiKo-wx/AmiKo-wx-mk/*.md5 | |
create_release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
needs: | |
- build_mac | |
- build_linux | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Check if need to create new release | |
id: check_tag | |
run: | | |
CURRENT_VERSION=$(./check_need_release.sh) | |
if [ -z $CURRENT_VERSION ] ; then | |
echo "Tag exists, no need to create release" | |
echo "::set-output name=need_release::false" | |
else | |
echo "Tag does not exist, creating release" | |
echo "::set-output name=need_release::true" | |
echo "::set-output name=current_version::${CURRENT_VERSION}" | |
fi | |
- uses: actions/download-artifact@v4.1.7 | |
if: steps.check_tag.outputs.need_release == 'true' | |
with: | |
name: mac-artifact | |
path: ~/mac-artifact | |
- uses: actions/download-artifact@v4.1.7 | |
if: steps.check_tag.outputs.need_release == 'true' | |
with: | |
name: linux-artifact | |
path: ~/linux-artifact | |
- name: Display structure of downloaded files | |
if: steps.check_tag.outputs.need_release == 'true' | |
run: | | |
ls -Rlah ~/mac-artifact ~/linux-artifact | |
env | |
env: | |
NEED_RELEASE: ${{ steps.check_tag.outputs.need_release }} | |
CURRENT_VERSION: ${{ steps.check_tag.outputs.current_version }} | |
- uses: rickstaa/action-create-tag@v1 | |
if: steps.check_tag.outputs.need_release == 'true' | |
with: | |
tag: ${{ steps.check_tag.outputs.current_version }} | |
commit_sha: ${{ github.sha }} | |
force_push_tag: true | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: steps.check_tag.outputs.need_release == 'true' | |
with: | |
name: ${{ steps.check_tag.outputs.current_version }} | |
tag_name: ${{ steps.check_tag.outputs.current_version }} | |
files: | | |
/home/runner/mac-artifact/*.dmg | |
/home/runner/linux-artifact/*.deb | |
/home/runner/linux-artifact/*.rpm | |
/home/runner/linux-artifact/*.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |