Create Release #5
This file contains hidden or 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: Create Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to release (e.g., v1.0.0-test)" | |
| required: true | |
| default: "v1.0.0-test" | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get tag name | |
| id: tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create artifacts directory | |
| run: mkdir -p artifacts | |
| - name: Create Athens3 artifact | |
| run: | | |
| cd athens3 | |
| tar -czf ../artifacts/athens3-${{ steps.tag.outputs.TAG_NAME }}.tar.gz \ | |
| config.toml app.toml genesis.json client.toml | |
| cd .. | |
| - name: Create Mainnet artifact | |
| run: | | |
| cd mainnet | |
| tar -czf ../artifacts/mainnet-${{ steps.tag.outputs.TAG_NAME }}.tar.gz \ | |
| config.toml app.toml genesis.json client.toml | |
| cd .. | |
| - name: Generate checksums | |
| run: | | |
| cd artifacts | |
| sha256sum ./*.tar.gz > checksums.txt | |
| cd .. | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.TAG_NAME }} | |
| name: ${{ steps.tag.outputs.TAG_NAME }} | |
| body: | | |
| ## Network Configuration Release ${{ steps.tag.outputs.TAG_NAME }} | |
| This release contains network configuration files for: | |
| - Athens3 Testnet | |
| - Mainnet | |
| ### Artifacts | |
| - `athens3-${{ steps.tag.outputs.TAG_NAME }}.tar.gz` - Athens3 testnet configuration | |
| - `mainnet-${{ steps.tag.outputs.TAG_NAME }}.tar.gz` - Mainnet configuration | |
| - `checksums.txt` - SHA256 checksums for verification | |
| ### Usage | |
| ```bash | |
| # Extract configuration for desired network | |
| tar -xzf athens3-${{ steps.tag.outputs.TAG_NAME }}.tar.gz | |
| # or | |
| tar -xzf mainnet-${{ steps.tag.outputs.TAG_NAME }}.tar.gz | |
| # Verify integrity (optional) | |
| sha256sum -c checksums.txt | |
| ``` | |
| files: | | |
| artifacts/athens3-${{ steps.tag.outputs.TAG_NAME }}.tar.gz | |
| artifacts/mainnet-${{ steps.tag.outputs.TAG_NAME }}.tar.gz | |
| artifacts/checksums.txt | |
| fail_on_unmatched_files: true | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |