Skip to content

publish

publish #326

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
on:
repository_dispatch:
types: [ publish ]
workflow_dispatch:
inputs:
name:
description: 'Description'
required: false
jobs:
build:
runs-on: windows-2019
if: "! contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
python-version: [ 3.8 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Install PyDrive, pillow and boto3
run: |
pip install PyDrive
pip install pillow
pip install boto3
- name: Install secure file
env: # Or as an environment variable
SETTINGS_YAML: ${{ secrets.SETTINGS_YAML }}
CREDENTIALS_JSON: ${{ secrets.CREDENTIALS_JSON }}
run: |
python env2file.py
dir
type credentials.json
type settings.yaml
shell: cmd
- name: Pack mod and upload
id: create_mod
run: |
python main.py
env:
PARATRANZ_SECRET: ${{ secrets.PARATRANZ_SECRET }}
AWS_S3_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }}
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
FILE_REPOSITORY: ${{ secrets.FILE_REPOSITORY }}
- name: push translation
run: |
dir
git config --global user.email "matanki.saito@gmail.com"
git config --global user.name "matanki.saito"
git config --global url."https://${{ secrets.GITHUB_TOKEN }}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
git add -A
git commit -m "Save/Update files [ci skip]"
git push origin HEAD:main
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
body: |
new mod released!
URL: ${{ steps.create_mod.outputs.download_url }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./out/dist.v2.json
asset_name: dist.v2.json
asset_content_type: application/json