Skip to content

Note on release schedule #175

Note on release schedule

Note on release schedule #175

Workflow file for this run

name: Build project
on:
push:
schedule:
- cron: "37 2 24 * *" # run once a month
workflow_dispatch:
jobs:
linux:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- name: Check out scripts
uses: actions/checkout@v2
- name: Download tags
run: git fetch --prune --unshallow
- name: Show available storage
shell: bash
run: df -h
# This cleans up some space that we might need, maybe in the future more is required as chromium gets larger
- name: Free up some disk space
uses: HandsomeYingyan/cleanup-disk-action@v3.0
- name: Show available storage
shell: bash
run: df -h
- name: Runnning build/generation script
shell: bash
run: |
sudo bash ./generate_everything.sh
working-directory: linux
- uses: actions/upload-artifact@v2
with:
name: linux-zip
path: linux/subresource_filter_tools_linux-x64.zip
- uses: actions/upload-artifact@v2
with:
name: SHA256SUMS-linux
path: linux/SHA256SUMS
- name: List chromium output directory
shell: bash
run: sudo find chromium/src/out
if: always()
working-directory: linux
continue-on-error: true
- name: Show available storage
shell: bash
run: df -h
if: always()
windows:
name: Build for Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Show disk usage
run: fsutil volume diskfree ((get-location).Drive.Name + ":")
- name: Show all disks
run: Get-PSDrive
# Install the Windows 10 SDK, choose a compatible version from here: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
- name: Install Windows 10 SDK
run: |
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2164145" -OutFile "winsdksetup.exe"
Start-Process -Wait -NoNewWindow -FilePath cmd -ArgumentList "/c", "winsdksetup.exe", "-features", "+", "-quiet"
# Install "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" and set it up as described in the "Setting up Windows" section
- name: Install Visual Studio Community 2019 Build Tools
continue-on-error: true
run: |
choco install visualstudio2019community --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --includeOptional --passive --locale en-US"
- name: Upload chocolately log file
uses: actions/upload-artifact@v2
with:
name: chocolatey-install-logs
path: C:\ProgramData\chocolatey\logs\chocolatey.log
if: ${{ always() }}
- name: Show disk usage
run: fsutil volume diskfree ((get-location).Drive.Name + ":")
- name: Run build script
run: .\build_windows.ps1
working-directory: windows
- name: Show disk usage
run: fsutil volume diskfree ((get-location).Drive.Name + ":")
if: ${{ always() }}
- name: Show all disks
run: Get-PSDrive
if: ${{ always() }}
- uses: actions/upload-artifact@v2
with:
name: windows-zip
path: windows/subresource_filter_tools_windows-x64.zip
release:
name: Release
needs: [linux, windows]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: linux-zip
- uses: actions/download-artifact@v2
with:
name: SHA256SUMS-linux
- uses: actions/download-artifact@v2
with:
name: windows-zip
- name: Display structure of downloaded files
run: ls -R
- name: Display downloaded zip contents
run: find . -maxdepth 1 -name "*.zip" -exec unzip -l {} \;
- name: Generate release info
run: |
bash other/release_info.sh > release.md
echo "Generated output file:"
cat release.md
- name: Generate tag name
run: echo "TAG_NAME=$(date +%F-%H-%M)" >> $GITHUB_ENV
- name: Get branch name (merge)
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
- name: Upload release
uses: softprops/action-gh-release@v1
with:
files: |
subresource_filter_tools_linux-x64.zip
subresource_filter_tools_windows-x64.zip
SHA256SUMS
tag_name: ${{ env.TAG_NAME }}
name: "Automated build for Linux and Windows"
fail_on_unmatched_files: true
body_path: release.md
draft: ${{ env.BRANCH_NAME != 'main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete older releases
uses: dev-drprasad/delete-older-releases@v0.1.0
with:
keep_latest: 7
delete_tags: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.BRANCH_NAME == 'main' }}