]> git.lizzy.rs Git - rust.git/commitdiff
Don't trigger stable release when pushing to nightly branch
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 19 Mar 2020 08:48:36 +0000 (09:48 +0100)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 19 Mar 2020 08:48:36 +0000 (09:48 +0100)
.github/workflows/release.yaml

index 13bc172ba868fe08559cbeec6eaf13905eb09696..df34dfdb8317d89de9d29e9eda9c3c83a4865ce7 100644 (file)
@@ -49,11 +49,11 @@ jobs:
         node-version: 12.x
 
     - name: Dist
-      if: github.event_name == 'push'
+      if: github.ref == 'refs/heads/release'
       run: cargo xtask dist --version 0.2.$GITHUB_RUN_NUMBER         --tag $(date --iso --utc)
 
     - name: Dist
-      if: github.event_name != 'push'
+      if: github.ref != 'refs/heads/release'
       run: cargo xtask dist --version 0.3.$GITHUB_RUN_NUMBER-nightly --tag nightly
 
     - name: Upload artifacts
@@ -73,9 +73,9 @@ jobs:
         node-version: 12.x
 
     - run: echo "::set-env name=TAG::$(date --iso --utc)"
-      if: github.event_name == 'push'
+      if: github.ref == 'refs/heads/release'
     - run: echo "::set-env name=TAG::nightly"
-      if: github.event_name == 'schedule'
+      if: github.ref != 'refs/heads/release'
     - run: 'echo "TAG: $TAG"'
 
     - name: Checkout repository
@@ -106,7 +106,7 @@ jobs:
       working-directory: ./editors/code
 
     - name: Publish Extension
-      if: github.event_name == 'push'
+      if: github.ref == 'refs/heads/release'
       working-directory: ./editors/code
       # token from https://dev.azure.com/rust-analyzer/
       run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer.vsix