Skip to content

build

build #6

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
#push:
# branches: [ "master" ]
#pull_request:
# branches: [ "master" ]
schedule:
- cron: '0 8 * * 0'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions: write-all
# 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:
runs-on: ubuntu-22.04
# 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:
submodules: recursive
fetch-depth: 0
- run: mkdir public
- run: ls ${{ github.workspace }}
- run: sudo apt-get update
- run: sudo apt install -y git python3-dev
- run: pip install -r ./requirements.txt
- run: python3 warodai-to-edict.py
- run: mv ./output.txt ./public/warodai-edict.txt
- name: Set version env variable
run: echo "version=$(date '+%Y%m%dT%H%M%S')" >> $GITHUB_ENV
- run: printf "${{ env.version }}" > ./version
- run: cp ./version ./public/
- run: ls ./public/
- name: Zip folder
run: zip -r -q -j -9 ./warodai-edict.zip ./public/
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
message: 'Action commit'
add: 'version'
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "${{ env.version }}"
name: "${{ env.version }}"
draft: false
prerelease: false
files: |
warodai-edict.zip