|
14 | 14 | CARGO_TERM_COLOR: always |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - tag: |
18 | | - name: Create Dev Tag |
19 | | - runs-on: ubuntu-latest |
20 | | - outputs: |
21 | | - version: ${{ steps.get_version.outputs.version }} |
22 | | - tag: ${{ steps.get_version.outputs.tag }} |
23 | | - steps: |
24 | | - - name: Checkout code |
25 | | - uses: actions/checkout@v4 |
26 | | - |
27 | | - - name: Get version from Cargo.toml |
28 | | - id: get_version |
29 | | - run: | |
30 | | - version=$(grep '^version' Cargo.toml | head -n1 | sed -E 's/version = "(.*)"/\1/') |
31 | | - today=$(date +'%Y%m%d') |
32 | | - tag="dev-$today" |
33 | | - echo "VERSION=$version" >> $GITHUB_ENV |
34 | | - echo "TAG=$tag" >> $GITHUB_ENV |
35 | | - echo "version=$version" >> $GITHUB_OUTPUT |
36 | | - echo "tag=$tag" >> $GITHUB_OUTPUT |
37 | | -
|
38 | | - - name: Create Git Tag |
39 | | - run: | |
40 | | - git config user.name "github-actions" |
41 | | - git config user.email "github-actions@github.com" |
42 | | - git tag "$TAG" |
43 | | - git push origin "$TAG" |
44 | | -
|
45 | | - github-release: |
46 | | - name: Create GitHub Dev Release |
47 | | - runs-on: ubuntu-latest |
48 | | - needs: tag |
49 | | - steps: |
50 | | - - name: Checkout code |
51 | | - uses: actions/checkout@v4 |
52 | | - |
53 | | - - name: Build release binary |
54 | | - run: | |
55 | | - cargo install cross |
56 | | - cross build --release --target x86_64-unknown-linux-gnu -p phlow-runtime |
57 | | - mv ./target/x86_64-unknown-linux-gnu/release/phlow ./phlow-x86_64-unknown-linux-gnu |
58 | | -
|
59 | | - - name: Create GitHub Release |
60 | | - uses: softprops/action-gh-release@v1 |
61 | | - with: |
62 | | - tag_name: ${{ needs.tag.outputs.tag }} |
63 | | - name: Dev Release ${{ needs.tag.outputs.tag }} |
64 | | - files: ./phlow-x86_64-unknown-linux-gnu |
65 | | - env: |
66 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
67 | | - |
68 | 17 | docker-ghcr: |
69 | 18 | name: Build & Push Dev to GHCR |
70 | 19 | runs-on: ubuntu-latest |
71 | | - needs: tag |
72 | 20 | steps: |
73 | 21 | - name: Checkout code |
74 | 22 | uses: actions/checkout@v4 |
|
91 | 39 | docker-hub: |
92 | 40 | name: Build & Push Dev to Docker Hub |
93 | 41 | runs-on: ubuntu-latest |
94 | | - needs: tag |
95 | 42 | steps: |
96 | 43 | - name: Checkout code |
97 | 44 | uses: actions/checkout@v4 |
|
0 commit comments