-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60bfce5
commit 70cbe6b
Showing
5 changed files
with
114 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Markdownlint configuration | ||
# refet to the documentation for details: | ||
# - [Linter for markdown](https://github.com/avto-dev/markdown-lint) | ||
# - [Rules configuration](https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml) | ||
# - [github](https://github.com/markdownlint/markdownlint?tab=readme-ov-file) | ||
# Default state for all rules | ||
default: true | ||
|
||
# Path to configuration file to extend | ||
extends: null | ||
|
||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md | ||
MD013: | ||
# Number of characters | ||
line_length: 160 | ||
# Number of characters for headings | ||
heading_line_length: 80 | ||
# Number of characters for code blocks | ||
code_block_line_length: 160 | ||
# Include code blocks | ||
code_blocks: true | ||
# Include tables | ||
tables: true | ||
# Include headings | ||
headings: true | ||
# Strict length checking | ||
strict: false | ||
# Stern length checking | ||
stern: false | ||
|
||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md | ||
MD033: | ||
# Allowed elements | ||
allowed_elements: [ | ||
details, | ||
summary, | ||
] | ||
|
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Create release with beb pacage | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
TERM: dumb | ||
CARGO_TERM_COLOR: always | ||
API_SERVER_ADDR: '0.0.0.0' | ||
API_SERVER_PORT: 8080 | ||
POSTGRES_PASSWORD: postgres | ||
PYTHON_VERSION: 'python3.10' | ||
|
||
jobs: | ||
build_and_test: | ||
name: Creating new release with beb pacage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update version number in the Cargo.toml | ||
run: | | ||
old_version_var=$(cat ./Cargo.toml | sed -rn 's/^version[\t ]*=[\t ]*\"([0-9]+\.[0-9]+\.[0-9]+)\"\s*$/\1/gp') | ||
echo "old version: $old_version_var" | ||
echo "new build: ${{ github.run_number }}" | ||
sed -i -r "s/^(version[\t ]*=[\t ]*\"[0-9]+\.[0-9]+\.)[0-9]+\"\s*$/\1${{ github.run_number }}\"/g" ./Cargo.toml | ||
new_version_var=$(cat ./Cargo.toml | sed -rn 's/^version[\t ]*=[\t ]*\"([0-9]+\.[0-9]+\.[0-9]+)\"\s*$/\1/gp') | ||
echo "new version: $new_version_var" | ||
echo "NEW_VERSION=$new_version_var" >> $GITHUB_ENV | ||
echo "new version: ${{ env.NEW_VERSION }}" | ||
- name: Build release | ||
run: cargo build --release | ||
|
||
- name: Commit new version ${{ env.NEW_VERSION }} | ||
run: | | ||
echo "on repositiry: ${{ github.repository }}" | ||
git config --global user.name 'anton.lobanov' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://a-givertzman:${{ secrets.RELEASES_TOKEN }}@github.com/${{ github.repository }} | ||
git commit -am "Automated version update to: ${{ env.NEW_VERSION }}" | ||
- name: Push to protected branch "master" | ||
uses: CasperWA/push-protected@v2 | ||
with: | ||
token: ${{ secrets.RELEASES_TOKEN }} | ||
branch: master | ||
unprotect_reviews: true | ||
|
||
- name: Zip artifact for deployment | ||
run: zip ./target/release/release.zip -r ./target/release/* ./config.yaml ./extensions/* | ||
|
||
- name: Publish release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "./target/release/release.zip" | ||
tag: internal_v${{ env.NEW_VERSION }} | ||
token: ${{ secrets.RELEASES_TOKEN }} |
This file contains 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