Skip to content

Commit

Permalink
Initial release from 6.07.24
Browse files Browse the repository at this point in the history
  • Loading branch information
adslbarxatov committed Jul 5, 2024
1 parent 6aed301 commit ddd11f3
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Действие, формирующее релиз
name: Release

# Активация по ручному вызову
on:
push:
branches: [ master ]
paths: .release/Release.md

# Содержит одно задание build с названием Project release с несколькими шагами
jobs:
build:
name: Project release
runs-on: ubuntu-latest

# Константы, используемые далее по тексту
env:
PROJ: ${{ github.event.repository.name }}
TAG: '1.0'

steps:
# Проверка состава репозитория (без анализа, как может показаться)
- name: Checkout code
uses: actions/checkout@v3

# Формирование релиза
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ env.TAG }}
name: ${{ env.PROJ }} v ${{ env.TAG }}
bodyFile: .release/Release.md
draft: false
prerelease: false

# Загрузка бинарных файлов в релиз
- name: Upload release asset
id: upload-release-asset
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
await fs.unlink (`./.release/Release.md`);
for (let file of await fs.readdir('./.release')){
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: ${{ steps.create_release.outputs.id }},
name: file,
data: await fs.readFile(`./.release/${file}`)
});
}
Binary file added .release/GrammarMustJoy.apk
Binary file not shown.
2 changes: 2 additions & 0 deletions .release/Release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_Changes for v 1.0_:
- Initial release as a stand-alone application

0 comments on commit ddd11f3

Please sign in to comment.