Bump pytest from 7.2.2 to 8.2.1 #307
Workflow file for this run
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
name: Build and publish | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- master | |
- develop | |
- beta | |
- stable | |
- v*.*.* | |
jobs: | |
create_release: | |
if: github.event.pull_request.merged | |
name: Create release | |
runs-on: ubuntu-20.04 | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
version: ${{ steps.export_outputs.outputs.version }} | |
branch: ${{ steps.export_outputs.outputs.branch }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init | |
- name: Install ubuntu dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install python-setuptools | |
- name: Set Versions | |
run: | | |
bash ./scripts/set_versions_ga.sh | |
- name: Set release | |
run: | | |
if [[ "$BRANCH" == "stable" ]]; then | |
export PRERELEASE=false | |
else | |
export PRERELEASE=true | |
fi | |
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: ${{ env.VERSION }} | |
draft: false | |
prerelease: ${{ env.PRERELEASE }} | |
- name: Export outputs | |
id: export_outputs | |
run: | | |
echo "::set-output name=version::$VERSION" | |
echo "::set-output name=branch::$BRANCH" | |
build_and_publish_normal: | |
if: github.event.pull_request.merged | |
needs: create_release | |
name: Build and publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
asset_name: skale-${{ needs.create_release.outputs.version }}-Linux-x86_64 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install ubuntu dependencies | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
- name: Checkout submodules | |
run: git submodule update --init | |
- name: Build normal binary | |
run: | | |
mkdir -p ./dist | |
docker build . -t node-cli-builder | |
docker run -v /home/ubuntu/dist:/app/dist node-cli-builder scripts/build.sh ${{ needs.create_release.outputs.version }} ${{ needs.create_release.outputs.branch }} normal | |
ls -altr /home/ubuntu/dist/ | |
docker rm -f $(docker ps -aq) | |
- name: Save sha512sum | |
run: | | |
sudo sha512sum /home/ubuntu/dist/${{ matrix.asset_name }} | sudo tee > /dev/null /home/ubuntu/dist/sha512sum | |
- name: Upload release binary | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: /home/ubuntu/dist/${{ matrix.asset_name }} | |
asset_name: ${{ matrix.asset_name }} | |
asset_content_type: application/octet-stream | |
- name: Upload release checksum | |
id: upload-release-checksum | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: /home/ubuntu/dist/sha512sum | |
asset_name: ${{ matrix.asset_name }}.sha512 | |
asset_content_type: text/plain | |
build_and_publish_sync: | |
if: github.event.pull_request.merged | |
needs: create_release | |
name: Build and publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
asset_name: skale-${{ needs.create_release.outputs.version }}-Linux-x86_64-sync | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install ubuntu dependencies | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
- name: Checkout submodules | |
run: git submodule update --init | |
- name: Build sync release binary | |
run: | | |
mkdir -p ./dist | |
docker build . -t node-cli-builder | |
docker run -v /home/ubuntu/dist:/app/dist node-cli-builder scripts/build.sh ${{ needs.create_release.outputs.version }} ${{ needs.create_release.outputs.branch }} sync | |
ls -altr /home/ubuntu/dist/ | |
docker rm -f $(docker ps -aq) | |
- name: Save sha512sum | |
run: | | |
sudo sha512sum /home/ubuntu/dist/${{ matrix.asset_name }} | sudo tee > /dev/null /home/ubuntu/dist/sha512sum | |
- name: Upload release sync CLI | |
id: upload-sync-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: /home/ubuntu/dist/${{ matrix.asset_name }} | |
asset_name: ${{ matrix.asset_name }} | |
asset_content_type: application/octet-stream | |
- name: Upload release sync CLI checksum | |
id: upload-sync-release-checksum | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: /home/ubuntu/dist/sha512sum | |
asset_name: ${{ matrix.asset_name }}.sha512 | |
asset_content_type: text/plain |